I'm using this library to parse my xml:
import xml.etree.cElementTree as xml
The xml input to the parser is an output of subprocess.Popen
:
XMLFile = subprocess.Popen(xml_command,shell=True,stdout=subprocess.PIPE, executable="/bin/ksh").communicate()[0]
root = xml.XML(XMLFile)
I get this error:
IOError: [Errno 36] File name too long: ' <?xml version=\...'
However, when I pass the xml generated from the same command xml_command
as file, it works perfectly fine:
root = xml.parse("/home/test.xml")