XML parsing in C ++: tinyxml

Source: Internet
Author: User

Disclaimer: Anyone and organizations are welcome to repost this blogArticleBut the original link and author information must be marked.

Link to this article:Http://blog.csdn.net/li_007/archive/2009/03/30/4037213.aspx

Pioneering little turtle -------> csdnBit by bitBlog

Some time ago, I needed to use C ++ to write a console for reading, writing, and parsing XML.ProgramIt is impossible to think about writing it by yourself. For this reason, I went to opensourece's stuff. Google found many libraries using Parser XML, finally, I learned about tinyxml and xerces, the famous Lib. xerces is a heavyweight Library contributed by IBM, while tinyxml is a very small XML parsing library, tinyxml is suitable for my needs, but it should be noted that tinyxml does not have the verification function. In this way, I need to perform a lot of verification to ensure the correctness of XML and increase the workload of programer, however, it is sufficient to deal with some configuration files and other functions that are easy to use.Code, Around 6000 lines of code, it is very convenient to serve us in the form of a static library.

Tinyxml contains the following classes:

It's easy. There are several classes. The functions of each class are as follows:

 

Here, tinyxml is based on Dom, so all data is stored in the memory, which facilitates reading and writing, and is not convenient to implement functions such as tixmlprinter, instead of sending an event to generate data as expected in Sax.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.