PyXML SAX Q?

mitsura at skynet.be mitsura at skynet.be
Wed Feb 15 17:11:53 EST 2006


Hi,

is it possible to use SAX to parse XML that is not in a file but in a
large string?
If I open my XML file and read the content into a string variable. Is
there a way I can pass it to the PyXML Sax handler?
The reason I want to know is that I need to parse XML that is generated
by a process on a Unix system. I can connect to the process via a
socket and the the XML but I need to store the XML somewhere before I
can parse it.
I could dump it to a file first and then hand it to the parser but that
seems unefficient.

Maybe I could read the XML from the socket directly into the parser.

Any ideas are welcome

With kind regards,

Kris




More information about the Python-list mailing list