paperjam
paperjam

Reputation: 8528

Streaming/progressive C++ XML creation library?

I'm looking for an XML library that writes out the XML stream as it goes. I've looked at TinyXML, pugixml, etc. and it seems these only write the stream when the entire DOM is built in memory. I want a library that will write each object as soon as all children and attributes are available. Is there such a thing?

Upvotes: 0

Views: 329

Answers (2)

paperjam
paperjam

Reputation: 8528

I wrote my own library in the end. I'm willing to share the source if it's of interest to anyone - it's a little clunky and minimal though.

Upvotes: 1

GazTheDestroyer
GazTheDestroyer

Reputation: 21261

The word you're looking for is SAX.

Xerces is one such C++ SAX library. If you're in the MS world then MSXML supports SAX2 too.

Upvotes: 2

Related Questions