Decent tool/library for C++ to handle XML?
I need to do some XML-related job (parsing, comparison etc). Is there any C++ library for this that you kno开发者_StackOverflow社区w works good ? Preferrably for Win XP. Thanks.
Tiny XML! Good library, ugly homepage: http://www.grinninglizard.com/tinyxml/
PugiXml will do it.
I use libxml2: http://www.xmlsoft.org
I used wxWidgets which has wxXmlDocument class that does a lot of hard work for you. It uses Expat internally, but handles all the charset conversions on its own. This is if you want a DOM based parser.
http://docs.wxwidgets.org/stable/wx_wxxmldocument.html
You might also want to look at Xerces, esp. if you want a SAX parser:
http://xerces.apache.org/xerces-c/
You may want to try Xerces, Pugixml and Mini-XML.
The xmlwrapp library is C++ wrapper around libxml2 that is quite usable and has the most C++-ish API from the alternatives I tried.
精彩评论