Comparison of TINYXML and rapidxml efficiency

Source: Internet
Author: User
Tags comparison table

Used to do in the beginning has been useless tinyxml, on-line search said rapidxml efficiency than tinyxml high. Individuals prefer the pursuit of efficiency, so they could not help but try to use Rapidxml. Rapidxml's official website is as follows: http://rapidxml.sourceforge.net/manual.html.

Rapidxml is an XML DOM parsing toolkit written in C + + that contains the entire parsing toolkit in a header file so that time is not compiled or connected. Just include the three header files in the Rapidxml. Rapidxml is trying to be the fastest XML DOM parsing toolkit, while ensuring the availability, portability, and compatibility of the results with the standards. When you manipulate the same data, the parsing speed is close to the strlen () function. the following is a common XML library efficiency comparison table provided by Rapidxml, which also provides an efficient comparison of the strlen () functions with a bull nose. If other users provide non-personal comparative data:

Second, simple use

include the necessary header files
#include "rapidxml.hpp"
Create a Document Object
rapidxml::xml_document<char> Doc;
parsing an XML string that requires the end of '% '
std::string str (...);
doc.parse<0> (Const_cast<char *> (Str.c_str ()));
Get node
rapidxml::xml_node<char> * node = Doc.first_node ("node name");
Traverse all nodes
For (rapidxml::xml_node<char> * node = Parent_node->first_node ("node name");
node! = NULL;
node = node->next_sibling ())
{
    ...
}

Comparison of TINYXML and rapidxml efficiency

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.