Thanks guys. I'll try out TinyXML.
-Nick
Parsing XML with C++
If the validation is important to you, you could use a third-party web-service (like W3C's XML validator) to validate the document in conjunction with TinyXML's parsing for local tasks. For instance, each time a user wants to save to a previously validated document, you could run the parser against it; if it passes, send it to the web service. If the web service returns a success code, you allow them to save; if not, you can throw an exception.
I use .NET XML processing when I'm in C# .. but in C++ I'm not happy with anything I've tried ... and plan to try TinyXML soon, for the simple stuff. Ruby has a great little XML library called ReXML, but that does nobody any good who doesn't use ruby (a good 99.99% of the world).
The problem with Xerces is, it very closely resembles the original DOM just as Java does in nearly every aspect, which has quite a few things which have been modeled more cleanly since ... and what's worse, not everything is supported, so you have a really large complicated API that is only 80% complete. And to top that off, they haven't provided the utility functions that could make life really easy, and instead give you sample projects for you to copy to roll your own ...
Basically, 3-4 years ago when I first used it, it was kinda hard, but impresive and featurefull for the time. Now its just a painfull dinasaur I still occasionaly have to use (when in cross platform C++).
The problem with Xerces is, it very closely resembles the original DOM just as Java does in nearly every aspect, which has quite a few things which have been modeled more cleanly since ... and what's worse, not everything is supported, so you have a really large complicated API that is only 80% complete. And to top that off, they haven't provided the utility functions that could make life really easy, and instead give you sample projects for you to copy to roll your own ...
Basically, 3-4 years ago when I first used it, it was kinda hard, but impresive and featurefull for the time. Now its just a painfull dinasaur I still occasionaly have to use (when in cross platform C++).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement