Is there a way to skip a string using a SAX XML parser?
I have a non-validating XML document, which is a concatenation of valid XML documents, and therefore appears for each document <?xml ...?>. Also note that I need to use the SAX parser as input documents are huge.
I tried to create the user stream class as a feeder for the analyzer, but quickly realized that SAX uses the method readand thus reads data in byte arrays, thereby exploding the complexity of this project.
thank!
UPDATE: I know there is a way around this with help csplit, but I am getting a Python based solution if reasonably possible.
Update2: Perhaps I should have said “go to the next document”, which would make more sense. Anyway, this is what I need: a way to analyze multiple documents from one input stream.
source
share