Common C/C ++ XML Resolvers include tinyxml, xerces, squashxml, xmlite, pugxml, and libxml. Some of these Resolvers support multiple languages, some are pure C/C ++. If you are first exposed to XML parsing, the selection of XML parser is indeed a headache. Let's take a look at the characteristics of these parser.
I. xerces XML Parser
Http://xerces.apache.org/xerces-c/
Xerces was formerly known as xml4c of IBM, and xml4c was also a powerful XML parser, which was handed over to the Apache Foundation for management and renamed xerces, xerces-C ++ makes it easier for your program to read and write XML data, the shared libraries provide the ability to parse, generate, operate, and verify XML documents using Dom, sax, and sax2 APIs.
Xerces-C ++ is loyal to XML 1.0 recommendations and related standards.
The xerces-C ++ parser features high performance, modularity, and scalability. Related Development materials are also relatively complete.
In addition to the C ++ version, xerces also provides xerces Java and xerces Perl versions.
Ii. tinyxml parser
Http://www.grinninglizard.com/tinyxml/
Tinyxml is easier to use than xerces, just as its name is tiny. tinyxml is also an open source parsing XML library for C ++ and supports Windows and Linux. Tinyxml uses the DOM model to traverse and analyze XML. Official documentation:
Http://www.grinninglizard.com/tinyxmldocs/index.html
Iii. squashxml parser
Official Address: http://ostatic.com/squashxml
This parser seems to be rarely used in China, and it is somewhat historical. Squashxml is based on Dom level2 and is also a lightweight XML parser. The reason why tianyuan wrote this article is that tianyuan is more important to the directory division and usage instructions of this parser, which is easy to understand and easy to use.
Iv. xmlbooster parser
Official Website: http://www.xmlbooster.com/
Xmlbooster focuses more on Parsing performance and states: "Application Integration of XML data cannot get any simpler or any faster: instead of dealing with sophisticated API (such as Dom or SAX), use a convenient data structure, generated to suit your specific purpose,
In the language of your choice .".
Use a more convenient data structure for special needs to improve performance.
V. libxml parser
Official Address: http://xmlsoft.org/
Libxml was originally developed for the gnome Project (C development) and later widely used,Powerful functions, Which is suitable for compilation and development in almost all common operating systems. Libxml ++ (Address: http://libxmlplusplus.sourceforge.net/) is against libxml
The C ++ package version of the XML parser. In addition, there are various language packages for official links.
Supplement:
In addition to the above XML Parser library, there are some XML Parser (refer to: http://www.garshol.priv.no/xmltools/platform/cpp.html), such as Berkely dbxml (bdb), interested readers can Google search on their own.
Although there are many types of XML parsers, and their functions are quite different, or even cross-platform and multi-language support, try to select a method that is relatively familiar and functional enough for your application, there is no need to pursue a complex parser. We only need to pay attention to the following three features: Adequate functionality, relatively stable, and suitable for scaling. Once there is a problem, it is easier to modify and expand.