zeux/pugixml — dự án mã nguồn mở — đang có 4.7k sao GitHub. Light-weight, simple and fast XML parser for C++ with XPath support
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modification
capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interface
variants 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
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.
Example
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>
int main()
{
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>
int main()
{
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";
}
}
License
This library is available to anybody free of charge, under the terms of MIT License (see LICENSE.md).
To honor the license agreement, please include attribution into the user-facing product documentation and/or credits, for example using this or similar text:
This work is based on the pugxml parser, which carried the following Public Domain dedication
// Pug XML Parser - Version 1.0002
// --------------------------------------------------------
// Copyright (C) 2003, by Kristen Wegner ([email protected])
// Released into the Public Domain. Use at your own risk.
// See pugxml.xml for further information, history, etc.
// Contributions by Neville Franks ([email protected]).
AI policy
AI-generated issues or pull requests (including pull request descriptions), will be closed. Repeat submissions may result in a ban.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/zeux/pugixml là nguồn chính thức.
zeux/pugixml có bao nhiêu sao?
zeux/pugixml có 4.7k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/zeux/pugixml. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
zeux/pugixml có những chủ đề gì?
GitHub topics của zeux/pugixml: "dom", "xml", "xml-parser", "xpath". TopGit xếp repo vào nhóm mã nguồn mở.
zeux/pugixml còn đang phát triển không?
Commit gần nhất trên zeux/pugixml là 5 tháng trước (theo timestamp GitHub). Repo có 815 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
zeux/pugixml viết bằng ngôn ngữ gì?
zeux/pugixml chủ yếu viết bằng C++. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về pugixml?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về pugixml.