Tinyxml is a lightweight C ++ interpreter based on the DOM model.
The Dom model is a Document Object Model. It divides a document into multiple elements (such as books, chapters, sections, and segments ), the tree structure is used to represent the ordered relationship between these elements and the nested inclusion relationship.
The following is an XML snippet: <persons>
<Person
Id = "1">
<Name> Zhou Xingxing </Name>
<Age> 20 </age>
</Person>
<Person
Id = "2">
<Name> Bai Jingjing </Name>
<Age> 18 </age>
</Person>
</Persons>
In tinyxml, some classes are defined based on various elements of XML:
Tixmlbase: The base class of the entire tinyxml model.
Tixmlattribute: attribute corresponding to the element in XML.
Tixmlnode: corresponds to a node in the DOM structure.
Tixmlcomment: corresponding to the comment in XML
Tixmldeclaration: corresponds to the declarative part in XML, that is, <? Versiong = "1.0"?>.
Tixmldocument: corresponds to the entire XML document.
Tixmlelement: Elements corresponding to XML.
Tixmltext: text part corresponding to XML
Tixmlunknown: corresponds to the unknown part of XML.
Tixmlhandler: defines some XML operations.
Tinyxml is a parsing library mainly composed of Dom model classes (tixmlbase, tixmlnode, tixmlattribute, tixmlcomment, tixmldeclaration, tixmlelement, tixmltext, tixmlunknown) and Operation class (tixmlhandler. It consists of two header files (. h file) and four CPP files (. CPP file), when used, as long as (tinyxml. h, tinystr. h, tinystr. CPP, tinyxml. CPP, tinyxmlerror. CPP, tinyxmlparser. CPP) import the project to use it. If needed, you can call it as your own DLL.