Jump to content
  • Advertisement
Sign in to follow this  
taby

Xml Parser, C++

This topic is 718 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

Advertisement

I've used Xerces in the past -- I didn't spend any significant amount of time researching or weighing its pros and cons versus competitors. The impression I get is that Xerces is probably the most conformant (its an Apache project, and is a validating parser) and is likely the most heavyweight library, for good and for ill. The other options mentioned here will likely get the job done in any case, and with conformant input themselves, even if they don't accept all conformant XML (that is, my impression is that they accept a pure subset of valid XML that differs in little-used ways, or ways not relevant to their use cases -- and that they do not accept invalid XML).

Share this post


Link to post
Share on other sites

I wrote a partial xml parser (for Tiled's tmx files) with std::regex yesterday, lol. Knowing what fields are going to be (or should be) present makes it a lot easier to work on.

Share this post


Link to post
Share on other sites

What have you used to parse XML files in C++?

Exactly what do you want to do with these parsed XML files? 

 

If you just want to read the XML into a data structure, TinyXML is simple and lightweight.

 

But it doesn't do schema validation or XSL transforms.

 

Libxml and Xerces will (I think, been a while since I used  them), but it's not as easy to use. 

Share this post


Link to post
Share on other sites

http://pugixml.org/ is a very nice one and my favourite, especially since it's just 2 headers and a source so it can be dropped right into project's source tree, zero hassle with building, linking. It has extremely friendly API in same naming style as C++ std lib does.

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!