]> git.phdru.name Git - extfs.d.git/commitdiff
Move getroot()
authorOleg Broytman <phd@phdru.name>
Thu, 21 Nov 2013 22:11:24 +0000 (02:11 +0400)
committerOleg Broytman <phd@phdru.name>
Thu, 21 Nov 2013 22:11:24 +0000 (02:11 +0400)
xml

diff --git a/xml b/xml
index 71dc2b98ed95dc6b5976e934bb2d4702d4582ac7..8bc536f24e9a6a87839479514e42d8535c20aa7f 100755 (executable)
--- a/xml
+++ b/xml
@@ -237,9 +237,6 @@ if use_elementtree or use_lxml:
                 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)
 
@@ -280,6 +277,9 @@ if use_elementtree:
 
             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