Jump to content
  • Advertisement
Sign in to follow this  
Raeldor

XML in C++... why so freakin' complicated?

This topic is 4815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am recoding an application I did in c#, and I used XML as the save/load mechanism. The framework provides XmlTextReader and XmlTextWriter objects which do simple XML reading and writing. I can't find anything like this in c++. I can see the DOM model, which doesn't sounds great because of the performance/memory overhead, and I can see the SAX model which is event driven (way complicated for me needs). Isn't there any simple serial XML read/write libraries for C++? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Xerces

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Xerces
http://xml.apache.org/xerces-c/

anon posters cant post html :/

[edit]
Washu: but mods can!
[/edit]

[Edited by - Washu on June 14, 2005 4:11:38 PM]

Share this post


Link to post
Share on other sites
I'm partial to expat. You simply define four callbacks. One for begin tag, end tag, begin raw (char data), end raw, and that's about it.

Share this post


Link to post
Share on other sites
XMLSCAN is ultra-fast with very small memory overhead. You can use it both in forward-scanning and in DOM-style mode. It's not a full-fledged parser/validator, though.

Share this post


Link to post
Share on other sites
MSXML for the win. it's uber leet. all you do is overwrite about 12 virtual functions ( just have them return 0 ). then handle startelement and endelement to define what to do when you encounter a new tag. startdocument and enddocument handle the opening and closing of the xml doc itself, and character(i think this is what it's called, can't remember for sure) handles what to do for the actual data inside a tag. it's quite simple really, feel free to ask any questions or pm me for further details, i use it in almost all of my projects.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!