Are there alternatives to expat for stream-oriented XML parsing in C++? The data that I am dealing with arrives over a TCP connection and there are multiple XML documents to deal with, which means I have to reset the XML parser every time there is a new document. The parser doesn't need to be standards-compliant; I'm interested in being able to parse the XML syntax using a callback-oriented process, rather than conforming to a particular schema.
Asked
Active
Viewed 1,010 times
0
-
What's wrong with expat? – jon hanson Aug 05 '10 at 18:31
-
There's a lot of buffer management and subtle checks one has to do to make it work properly with multiple XML documents coming in as a stream. Also the errors that it returns when it does fail aren't very helpful. Perhaps this is just a hard problem for any XML parser, but I'm just want to take a look at any alternatives if there are any. – Kenny Peng Aug 05 '10 at 22:11
-
Voting to close as tool rec. – Ciro Santilli OurBigBook.com Nov 19 '15 at 21:57
-
Have a look at https://github.com/igagis/mikroxml – igagis Aug 30 '17 at 12:49
2 Answers
2
What about Xerces-C++?

wilx
- 17,697
- 6
- 59
- 114
-
Test-driving Xerces-C++ right now. The API is nice, but I'm not sure whether it will support the kind of streaming that happens over a TCP connection, where I'll receive chunks of data, and many documents and need to reset the XML parsing without losing the spot in the buffer where it left off. – Kenny Peng Aug 05 '10 at 21:37