I will potentially have to load very large xml files and I'm evaluating TinyXML to see how it would work for me. Most of the XML files will be relatively small, which is why I would like to go with a DOM parser. But would it be possible to pass TinyXML chunks of the large XML file so that I don't have to have the whole file in memory at once? Then when it is done parsing the chunk I send it the next chunk.
Also, can TinyXML call one of my callbacks after it has parsed a complete element?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
TinyXML is designed to load the entire XML file into memory, in the form of a hierarchical data structure. Consequently it is not an appropriate choice for large files that may run out of memory.
What you need is a stream-oriented XML parser. For example, see expat at:
I will potentially have to load very large xml files and I'm evaluating TinyXML to see how it would work for me. Most of the XML files will be relatively small, which is why I would like to go with a DOM parser. But would it be possible to pass TinyXML chunks of the large XML file so that I don't have to have the whole file in memory at once? Then when it is done parsing the chunk I send it the next chunk.
Also, can TinyXML call one of my callbacks after it has parsed a complete element?
TinyXML is designed to load the entire XML file into memory, in the form of a hierarchical data structure. Consequently it is not an appropriate choice for large files that may run out of memory.
What you need is a stream-oriented XML parser. For example, see expat at:
http://www.xml.com/pub/a/1999/09/expat/index.html