if text: text_accumulator.append(text)
return '\n'.join(text_accumulator).encode(default_encoding, "replace")
- def getroot(self):
- return self.document.getroot()
-
def getchildren(self, node):
return list(node)
self.document = ET.parse(sys.argv[2], PIParser())
+ def getroot(self):
+ return self.document.getroot()
+
def getlocalname(self, name):
if name.startswith('{'):
name = name.split('}', 1)[1] # Remove XML namespace