diff options
author | David Sommerseth <davids@redhat.com> | 2009-06-11 18:48:13 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2009-06-11 18:48:13 +0200 |
commit | b82418a07c08c31320577606d41305c5c46367b2 (patch) | |
tree | 4c9518d6d48e9e4c07cc59d0ab015a460200e576 /rteval/xmlout.py | |
parent | 6e1de9fe9353e13118fb48a1e1d1bbe99da90a00 (diff) | |
download | rteval-b82418a07c08c31320577606d41305c5c46367b2.tar.gz rteval-b82418a07c08c31320577606d41305c5c46367b2.tar.xz rteval-b82418a07c08c31320577606d41305c5c46367b2.zip |
Added support for appending libxml2.xmlNode directly to xmlout
Diffstat (limited to 'rteval/xmlout.py')
-rw-r--r-- | rteval/xmlout.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rteval/xmlout.py b/rteval/xmlout.py index ea40d8f..cedaa91 100644 --- a/rteval/xmlout.py +++ b/rteval/xmlout.py @@ -219,6 +219,12 @@ class XMLOut(object): self.__parseToXML(ntag, data) self.currtag.addChild(ntag) + def AppendXMLnodes(self, nodes): + if not isinstance(nodes, libxml2.xmlNode): + raise ValueError, "Input value is not a libxml2.xmlNode" + + return self.currtag.addChild(nodes) + if __name__ == '__main__': x = XMLOut('rteval', '0.6', None, 'UTF-8') |