- Notifications
You must be signed in to change notification settings - Fork0
fork of pugixml, used for camarohttps://github.com/tuananh/camaro
License
tuananh/pugixml
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modificationcapabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interfacevariants and conversions between different Unicode encodings (which happen automatically during parsing/saving).
pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface.
Documentation for the current release of pugixml is available on-line as two separate documents:
- Quick-start guide, that aims to provide enough information to start using the library;
- Complete reference manual, that describes all features of the library in detail.
You’re advised to start with the quick-start guide; however, many important library features are either not described in it at all or only mentioned briefly; if you require more information you should read the complete manual.
Here's an example of how code using pugixml looks; it opens an XML file, goes over all Tool nodes and prints tools that have a Timeout attribute greater than 0:
#include"pugixml.hpp"#include<iostream>intmain(){ pugi::xml_document doc; pugi::xml_parse_result result = doc.load_file("xgconsole.xml");if (!result)return -1;for (pugi::xml_node tool: doc.child("Profile").child("Tools").children("Tool")) {int timeout = tool.attribute("Timeout").as_int();if (timeout >0) std::cout <<"Tool" << tool.attribute("Filename").value() <<" has timeout" << timeout <<"\n"; }}
And the same example using XPath:
#include"pugixml.hpp"#include<iostream>intmain(){ pugi::xml_document doc; pugi::xml_parse_result result = doc.load_file("xgconsole.xml");if (!result)return -1; pugi::xpath_node_set tools_with_timeout = doc.select_nodes("/Profile/Tools/Tool[@Timeout > 0]");for (pugi::xpath_node node: tools_with_timeout) { pugi::xml_node tool = node.node(); std::cout <<"Tool" << tool.attribute("Filename").value() <<" has timeout" << tool.attribute("Timeout").as_int() <<"\n"; }}
This library is available to anybody free of charge, under the terms of MIT License (see LICENSE.md).
About
fork of pugixml, used for camarohttps://github.com/tuananh/camaro
Resources
License
Security policy
Stars
Watchers
Forks
Packages0
Languages
- C++97.8%
- CMake1.0%
- PowerShell0.5%
- Makefile0.2%
- Lua0.2%
- Python0.2%
- Other0.1%