monoceres Posted December 8, 2009 Posted December 8, 2009 (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 memoryLightweight, should only use STL and native code.Reasonable easy to useAs 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 December 8, 2009 by monoceres Broken link? PM me and I'll send you the file!
JRowe Posted December 9, 2009 Posted December 9, 2009 Expat is probably good, MIT license. http://sourceforge.net/projects/expat/ [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center]
monoceres Posted December 9, 2009 Author Posted December 9, 2009 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!
Valik Posted December 9, 2009 Posted December 9, 2009 (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 December 9, 2009 by Valik
monoceres Posted December 9, 2009 Author Posted December 9, 2009 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!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now