Sign in to follow this  
Followers 0
monoceres

XML Parser for C++

5 posts in this topic

#1 ·  Posted (edited)

First off, I have zero experience with xml and thats pretty much why I'm creating this topic.

I'm working on a project where I'm going to parse these kind of xml's.

Can anyone recommend a parser to use?

My requirements for the parser is as follows:

  • Able to parse the above xml (obviously)
  • Load the XML from memory
  • Lightweight, should only use STL and native code.
  • Reasonable easy to use
  • As free as possible, I don't feel like being caged by a strict license.
As long as compiles in VC++2008 I should be fine.

I took a look at TinyXML and it looked good, but I'm not sure it handles xml's in memory?

Thanks.

Edited by monoceres

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites

The C implemention in that library with function pointers and stuff will not fit in very well with my strict object oriented approach in this project. So I rather use a libary that's already OO.

Thanks for the suggestion though.

As I said before, TinyXml seems awesome, but I have no idea if it's a crap library or whatever. I now think it can load the xml from memory (I found TiXmlDocument::Parse), but I'm not sure.


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Any XML parser worth using will have a public method for parsing a string. Internally a load-from-file function would need to call a parse-from-string function anyway so there's no reason the library won't expose it as part of it's API. Besides, if its a DOM or SAX based parser it's required to have such a method or it doesn't conform to those parsing methods.

Edited by Valik

Share this post


Link to post
Share on other sites

In brief, TinyXML parses an XML document, and builds from that a Document Object Model (DOM) that can be read, modified, and saved.

Guess I should be fine then. TinyXml meets all criterias I set up above.

Any other suggestions for an XML parser is still welcome though.


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0