I'm parsing a really simple .xml file with this snippet
import xml.etree.ElementTree as etree
tree = etree.parse('/home/user/dummy.xml')
print(tree.getroot())
the output is
<Element 'doc' at 0x1d2f090>
which is correct, but I was expecting something cleaner and as simple as
doc
is this the normal output ? How I can clean this ?
I'm using Python 3.x
the dummy.xml file
<?xml version="1.0"?>
<doc>
<branch name="testing" hash="1cdf045c">
text,source
</branch>
<branch name="release01" hash="f200013e">
<sub-branch name="subrelease01">
xml,sgml
</sub-branch>
</branch>
<branch name="invalid">
</branch>
</doc>