Creating subtree from tree which is represented in xml - python
- by Jay
Hi
I have an XML (in the form of tree), I require to create sub-tree out of it.
For ex:
<a>
<b>
<c>Hello</c>
<d>
<e>Hi</e>
</a>
Subtree would be
<root>
<a>
<b>
<c>Hello</c>
</b>
</a>
<a>
<d>
<e>Hi</e>
</d>
</a>
</root>
What is the best XML library in python to do it? Any algorithm that already does this would also be helpful. Note: the XML doc won't be that big, it will easily fit in memory.