I am trying to use one of the standard python3 libs to parse some data, that is being returned as XML, from a website. I just want something really simple. I am not doing anything that complex.
It seems like xml.etree.ElementTree is exactly what I want. Except, the parse function takes a file name parameter, instead of a buffer which contains the xml. I don't see a class member that seems to take a buffer/string. If it were the other way around, you could easily still read in that file and parse it with "ET.Parse(fd.read(-1))" and you are done. But, alas, the function requires a filename. I can work around this by writing to a file in /tmp, then parsing it. But, that seems silly (to be polite) to write to disk, only to read it back in and parse it.
Basically, I want:
xml.etree.ElementTree.parse(xmlbuffer)
Where, xmlbuffer is a string, not a filename.
Any ideas?