cici xml output..

This commit is contained in:
A. Murat Eren
2005-07-21 00:53:39 +00:00
parent 80cd6f57d8
commit 07853c527b
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -27,7 +27,8 @@ def getNodeText(node, tagpath = ""):
except AttributeError: # no node by that name
return None
if child.nodeType == child.TEXT_NODE:
return child.data
# in any case, strip whitespaces...
return child.data.strip()
else:
raise XmlError("getNodeText: Expected text node, got something else!")
+2 -1
View File
@@ -38,7 +38,8 @@ class XmlFile(object):
def writexml(self, fileName):
f = codecs.open(fileName,'w', "utf-8")
self.dom.writexml(f)
f.write(self.dom.toprettyxml())
f.close()
def verifyRootTag(self):
if self.dom.documentElement.tagName != self.rootTag: