Is there a easy way to accomplish the same thing in Python as xsl accomplishes with:
<xsl:strip-space elements="*"/>
So for instance in the following
for event, elem in ElementTree.iterparse("/tmp/example.xml"):
if elem.tag == "example":
print ElementTree.tostring(elem)
when the example nodes are printed out all the spaces and line feeds in the input file between children of the example node will be removed?
If you can use the lxml module, this becomes much easier. From the lxml tutorial: