Which is the most efficient XML Parser for C ++?

I need to write an application that retrieves an item name pair (time series data) from any XML source, be it a file, web server, any other server. the application will consume XML and retrieve the values โ€‹โ€‹of interest, it must be very fast (say 50,000 events / seconds or more) and the size of the XML document will be huge and the frequency of that document can be high (for example 2500 files / min - over 500 MB data / XML file).

I just want to see how you people thought I should approach this. I am a beginner who just started, although I can make any solution you suggest me no matter how difficult / easy it is.

Many thanks.

+2


source to share


3 answers


If you are using SAX parsing, your bottleneck is the I / O involved, not the processing of XML strings. And given your 500MB number, I'd say you would need SAX parsing instead of DOM parsing. So anything that has a SAX interface should be fine.



+4


source


I'm a fan of Xerces , I think you'll have to try them to see what's the best for your application. Like Warren, you will want to use SAX processing. In reality, if you really want performance, you should use a specialized XML device to do the processing.



+2


source


I am using libxml2 in our projects. It supports both SAX and DOM. As Warren Young said, you should use SAX. You could try Expat.

0


source







All Articles