git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a646e9b
)
added append() and iterchildern() to XML class
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Tue, 15 Nov 2011 03:36:10 +0000
(22:36 -0500)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Tue, 15 Nov 2011 21:28:56 +0000
(16:28 -0500)
sfa/util/xml.py
patch
|
blob
|
history
diff --git
a/sfa/util/xml.py
b/sfa/util/xml.py
index
dece35b
..
9d5f52c
100755
(executable)
--- a/
sfa/util/xml.py
+++ b/
sfa/util/xml.py
@@
-217,7
+217,6
@@
class XML:
node = self.root
node.remove_attribute(name)
node = self.root
node.remove_attribute(name)
-
def add_element(self, name, **kwds):
"""
Wrapper around etree.SubElement(). Adds an element to
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
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
def merge(self, in_xml):
pass