From: Tony Mack Date: Tue, 15 Nov 2011 03:36:10 +0000 (-0500) Subject: added append() and iterchildern() to XML class X-Git-Tag: sfa-1.1-3~6 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=45a8a928ab6094f50d6745db1bd617d112fd6c72 added append() and iterchildern() to XML class --- diff --git a/sfa/util/xml.py b/sfa/util/xml.py index dece35b1..9d5f52c4 100755 --- a/sfa/util/xml.py +++ b/sfa/util/xml.py @@ -217,7 +217,6 @@ class XML: node = self.root node.remove_attribute(name) - def add_element(self, name, **kwds): """ Wrapper around etree.SubElement(). Adds an element to @@ -268,6 +267,12 @@ class XML: attrs['child_nodes'] = list(elem) return attrs + def append(self, elem): + return self.root.append(elem) + + def iterchildren(self): + return self.root.iterchildren() + def merge(self, in_xml): pass