J
Jan Danielsson
If have an element tree representing an XML document, and I load
another tree from a file, is there an easy way to stick the second tree
into the first one?
fooElement = ET.SubElement(...)
tree = ET.parse(TEMPLDIR + '/welcome.xml')
elem = tree.getroot()
Now I want to stick elem as a subelement of fooElement. Do I need to
traverse the elem tree manually, or is there a way to just 'stick it in
there'?
another tree from a file, is there an easy way to stick the second tree
into the first one?
fooElement = ET.SubElement(...)
tree = ET.parse(TEMPLDIR + '/welcome.xml')
elem = tree.getroot()
Now I want to stick elem as a subelement of fooElement. Do I need to
traverse the elem tree manually, or is there a way to just 'stick it in
there'?