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

170 questions
0
votes
1 answer

pugixml, select specific child according to value from other child

I'm using pugixml with C++ which works perfectly. However, I would like to be able to choose a specific child from a structure like this: 1
user809829
  • 1,179
  • 3
  • 14
  • 33
0
votes
1 answer

Casting const char * to non const char*

I am writing a program in c++ to compare two large XML files and create a file with the identifiers and changes of the products (nodes) that changed. To do so I am using pugixml. I am working as a PHP developer at the moment, and it has been a while…
AntiFTW
  • 3
  • 2
0
votes
1 answer

Open an XML file in Codeblocks (C++) using pugixml

I've been looking for how to parse an xml file using codeblocks and the library pugixml but I've tried different ways and it still doesn't work. The XML I have to parse consists on a graph (houses) and my program in C++ is to represent this graph…
0
votes
2 answers

Insert form data directly to PugiXML doccument

I'm trying to insert data from a form in VC++ 2010 using pugiXML. The issue is that whenever I try to enter the data, I get this error: Error 1 error C2664: 'pugi::xml_node::set_value' : cannot convert parameter 1 from 'System::String ^' to…
Justin
  • 93
  • 1
  • 11
0
votes
0 answers

PugiXML Preserve Whitespace, but not EOL

I'm converting html into xml, changing tag names and other stuff, but i have problems with preserving whitespaces. This is how I'm loading file: xml_parse_result check = doc.load_file(sourcePath.c_str(), (parse_default | parse_ws_pcdata),…
Horokey
  • 1
  • 1
0
votes
0 answers

I can't seem to swap the location of parallel nodes/subtrees within a pugixml document....?

I need to re-sequence the majority of child nodes at one level within my document. The document has a structure that looks (simplified) like this: sheet table row parameters row parameters row …
0
votes
1 answer

Add xml text structure to xml document

I have a loaded pugi::xml_document with e.g. and want to add xml text structure to this pugi xml doc! example for xml text structure: (stored in std::string) some text Final xml doc should look like…
leon22
  • 5,280
  • 19
  • 62
  • 100
0
votes
1 answer

Xpath: selecting nodes that have a certain child node

Using the pugixml library, I am trying to select all nodes that fit: //v6_root_object/v6_rootlist2d/obj_pluginobject[@level='0'] that have a child node described…
AdamSpurgin
  • 951
  • 2
  • 8
  • 28
0
votes
1 answer

pugixml not finding file

I have the following code: pugi::xml_document doc; pugi::xml_parse_result result = doc.load_file( "C:/Users/James/Documents/Visual Studio 2013/Projects/Games/Jimmy/Game/Assets/Levels/Scene.dae" ); std::cout << "Load result: " <<…
Jimmyt1988
  • 20,466
  • 41
  • 133
  • 233
0
votes
1 answer

How to get element text to WCHAR* in pugixml

I'm using pugixml library to parse xml files. How can I get the node text to WCHAR* in pugixml ?
user2179256
  • 659
  • 2
  • 9
  • 21
0
votes
1 answer

assigning nodes to a new parent using pugixml

I use pugixml to read a svg document. After I read the svg I have a pugixml::document like this (simplified): text
randooom
  • 541
  • 2
  • 11
0
votes
0 answers

Visual studio 2013, unresolved external symbol error when working with local source library (pugixml)

I'm attempting to use the pugiXML library to read some XML, and I can't get it to compile correctly. After moving the source files(3) into the working directory, bringing them into the project, and disabling the use of precompiled headers, I have…
AdamSpurgin
  • 951
  • 2
  • 8
  • 28
0
votes
0 answers

Parse XML File Multiple Elements - Same Name - PugiXML - C++

I am trying to parse one quite big XML file using PugiXML which I find easy enough to understand. My problem is that in the XML file I have multiple elements with the same name and inside them other elements with the same name too. The only way I…
Spyros
  • 682
  • 7
  • 18
  • 37
0
votes
1 answer

PUGIXML ignores data elements and nodes without attributes?

I must be doing something fundamentally wrong. I have a test program set up to read and display an xml file's contents so that I can study and learn how the data is stored and represented. I have enormous spreadsheet-generated xml files that drive…
0
votes
1 answer

pugixml spritesheet navigation

I have an xml file that describes sprites located in a sprite sheet:
Jim
  • 423
  • 1
  • 4
  • 13