Questions tagged [pugixml]

Light-weight, simple and fast XML parser for C++ with XPath support

Overview(from official website)

pugixml is a light-weight C++ XML processing library. It features:

  • DOM-like interface with rich traversal/modification capabilities
  • Extremely fast non-validating XML parser which constructs the DOM tree from an XML file/buffer
  • XPath 1.0 implementation for complex data-driven tree queries
  • Full Unicode support with Unicode interface variants and automatic encoding conversions

The library is extremely portable and easy to integrate and use.

pugixml is developed and maintained since 2006 and has many users. All code is distributed under the MIT license, making it completely free to use in both open-source and proprietary applications.

Links

164 questions
0
votes
1 answer

Recursive pugixml, can't get values

Well, I got code pugi::xml_node text = doc.child("text").child("girl"); for (int i = 0; i < situations.size(); i++) { std::cout << situations[i] << std::endl; text = text.child(situations[i].c_str()); // problem } After that code, I can't…
0
votes
1 answer

PugiXML empty document without error

I've the following XML:
Victor Aurélio
  • 1,837
  • 20
  • 41
0
votes
1 answer

C++ PugiXML Vector Iterators Incompatible Error

I have an application where I parse XML code into sprites with textures using PugiXML. However, I'm experiencing problems getting this one for loop working, as the compiler keeps returning the Expression: vector iterators incompatible run-time error…
Blaze356
  • 133
  • 1
  • 11
0
votes
0 answers

cocos2d-x pugi xml french words

I had some problem with parsing xml document with french words. For example pêche After parsing i have this: "p\xc3\xaache" instead of "pêche" Here is my code: for(pugi::xml_node child = parent.first_child(); child; child =…
0
votes
1 answer
0
votes
1 answer

Using pugixml in wchar_t mode and in usual mode in one project

I have a project with many .cpp files. In some of these files I need to use pugixml in wchar_t mode and some of them are already implemented using char and pugixml in usual mode. I know I have to use definition #define PUGIXML_WCHAR_MODE When I…
spandei
  • 209
  • 2
  • 14
0
votes
1 answer

Unable to access XML nodes using in loop using pugixml

I have an XML file with the following format 1 Head 2 Right Hand 3
Ibrahim
  • 105
  • 3
0
votes
1 answer

pugixml: Cannot get children/cannot iterate

I am using pugixml for the first time and I am not able to correctly load a file into memory. My XML test document: I use following code to load the document and get the child: pugi::xml_document…
u7f1mrfpf
  • 31
  • 1
  • 7
0
votes
2 answers

Retrieving PCDATA xpath via the c++ pugixml library

I spent the last week reading and re-reading the pugixml documentation and I can find no method of retrieving the PCDATA with xpath. Please explain would I pull the text from title: Hello! Last time I asked…
user688579
  • 21
  • 1
0
votes
1 answer

Pugixml - Convert xml element content to C++ array

In my xml file I have arrays of ints written as follows: "1 10 -5 150 35", and I am using pugixml to parse it. I know pugixml provides methods such as as_bool, or as_int, but does it provide an easy way of converting the string representation of an…
Lanaru
  • 7,862
  • 6
  • 31
  • 62
0
votes
1 answer

using pugixml to parse data using C++ but unable to get all the node attributes

I made a code that parse Function but it won't parse the Argument (name,type) My Code: xml_node GCC_XML = doc.child("GCC_XML"); { for (xml_node Function = GCC_XML.child("Function");Function; Function= Function.next_sibling("Function")) { …
Mic Hans
  • 27
  • 5
-1
votes
1 answer

How to Parse the XML structure data in CPP while going and accessing each node?

I'm very new to XML parse in C++. I want to parse the XML. So, I'm using the PugiXML library. I mainly want to get the values from each of the children nodes. Here, is the sample code till here I have written, then I don't understand what to do…
-1
votes
1 answer

Compare std::vector of pairs with pugi::xml_object_range attributes

I'm writing some convenience functions for my XML parser based on pugixml, and now I have the problem that I want to retrieve only XML nodes with a specific attribute name and value! XML example:
leon22
  • 4,365
  • 15
  • 57
  • 86
-3
votes
1 answer

Get the value of a random parameter in pugixml

I have a question regarding the extraction of parameter values from an xml file using pugixml. I have an XML file with a hierarchical structure, and would like to retrieve the value associated with a specific parameter. Part of the file looks like…
Wballer3
  • 75
  • 5
1 2 3
10
11