[EMAIL PROTECTED] > 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.
You can find exactly what you need in this old thread about incremental XML parsing. Parsing XML streams http://groups.google.com/group/comp.lang.python/msg/e97309244914343b? -- alan kennedy ------------------------------------------------------ email alan: http://xhaus.com/contact/alan -- http://mail.python.org/mailman/listinfo/python-list