I have a small python snippet processing xml that works with ElementTree but not with cElementTree. Why is this?
#!/usr/bin/python3 import sys import xml.etree.cElementTree as ET tree = ET.parse(sys.stdin)
an exception occurs:
cElementTree.ParseError: no element found: line 1, column 0
when he is called like that
echo "<a><b>c</b></a>" | ./xmltest.py
EDIT: I just noticed that the fragment works in python 2.7.2 but not in python 3.2.2 or 3.1.4, any idea why?
Update: It seems to be fixed in python 3.3
source share