Questions tagged [rapidxml]

A general purpose XML parser for C++ designed for execution speed and practical usage. It can also modify nodes and output a full xml document.

Rapidxml is a header-only XML parser with high usability, portability, and very good W3C compatibility.

  • no dependencies (except standard C++ library <cassert>, <cstdlib>, <new>, and <exception>
  • character type agnostic: supports narrow and wide, wchar_t UTF-16 and UTF-32, and UTF-8 if endianness is native
  • special memory pool object management for speed
  • not fully W3C compliant: ignores DOCTYPE declarations, and minor incompatibilities
  • robust and has a large unit test harness
  • easy to learn and use: begin writing useful parsing code in less than five minutes
  • license is Boost Software License or MIT License
  • stable since 2006
  • an additional header-only file adds the ability to stream out and format an xml document
  • other header classes simplify iterating through a document, loading from a file, and get child counts

Rapidxml is widely cross-platform compatible, its execution speed is proportional to the length of the XML data parsed, and it requires no configuration and no metadata or schema.

177 questions
1
vote
0 answers

rapidxml first_attribute registering a '/' as a '}'

Okay so I have to be missing something pretty obvious but I have yet to find cause of this issue. I have a xml file that contains information about a systems units. Originally, I was saving the units in another location of the file and parsing the…
JCoder
  • 37
  • 4
1
vote
2 answers

RapidXML node has correct value in try catch block, but it's nullptr outside the block

This might be more of a c++ problem rather than a rapidxml problem, and I'm still learning c++ so sorry if this is a very stupid question. I am trying to load an XML file within a try block: rapidxml::xml_document<> doc; rapidxml::xml_node<>*…
devobvious
  • 11
  • 1
1
vote
1 answer

How to add RapidXml to a CMake Project?

I want to add RapidXML to my CMake Project, so i can use it. My Project Structure looks like this: Root | |_inc (for my own Headers) | |_main.h | |_CMakeList.txt |_src (for my own Sources) | |_main.cpp | |_CMakeList.txt |_libs (for third…
Limatuz
  • 496
  • 2
  • 5
  • 10
1
vote
1 answer

How to parse an XSD file with RapidXML

Does RapidXML have the capability to validate/parse a XML file with its associated schema, i.e. XSD file? I was under the assumption that an XML parser would have the capability to do both congruently. If not, why is it deemed unnecessary to…
1
vote
1 answer

write to XML with RapidXML

I am trying to read my vector with tuple and parse it in to a xml file. The writing to the XML file works but he only write the values of the last node. So i get only the same values all time. I found that after the for loop he loosing all existing…
Julian K.
  • 37
  • 6
1
vote
1 answer

c++ rapidxml cant use saved xml_document properly

i'm trying to parse some xml string to an xml_document, and save the xml_document to a variable for further usage. Directly after the parsing the xml_document is useable, but i cant access it from another method. Heres the example code: XML.h // //…
Artur
  • 38
  • 4
1
vote
1 answer

No leaks from rapidxml

Today I was trying to find memory leaks from my project then I came across the below sample code std::string VersionValue("1.0"); std::string EncodingValue("UTF-8"); rapidxml::xml_document<> XMLDoc; rapidxml::xml_node<> * pHeaderNode =…
Gilson PJ
  • 3,002
  • 2
  • 25
  • 47
1
vote
0 answers

How to get the content of the tag by using references idref in xml

here is my code. taxi taxi
1
vote
2 answers

Rapidxml is not compiling on Visual Studio 2010. What am I doing wrong?

I am working on switching XML parsers from TinyXml to RapidXml in our codebase. However, RapidXml does not seem to compile with Visual Studio 2010. Basically, in the header file I am doing #define RAPIDXML_NO_EXCEPTIONS #include…
bastibe
  • 14,886
  • 24
  • 86
  • 118
1
vote
0 answers

Delete a node by rapidxml without deleting its subnode

hanhao 18 e.g. I want to delete the "top" node,at the same time ,remain its subnode "name" and "value" and…
Aaron Hao
  • 37
  • 6
1
vote
1 answer

Rapidxml traversing nodes

the xml file: hanhao 18 my cpp…
Aaron Hao
  • 37
  • 6
1
vote
2 answers

Add number (double/float) as attribute to RapidXML node

I'm pretty new to RapidXML. I want to construct an Xml document and print it to a file. Everything works but I'm not sure if I'm doing one part of the process right: Adding an attribute to a node that is a double. I'm using std c++ stuff: double…
Oliver Zendel
  • 2,052
  • 24
  • 27
1
vote
2 answers

EWS GetStreamingEvents. Response is received only by timeout

In my iOS app I'm trying to get streaming events from EWS following this manual. So first I subscribe for notifications, receive a subscription id and then perform GetStreamingEvents request. The subscription process is successful, however getting…
Andrey Chernukha
  • 20,316
  • 16
  • 89
  • 153
1
vote
1 answer

C++/RapidXML: Edit node and write to a new XML file doesn't have the updated nodes

I'm parsing a XML file from a string. My node Id is bar, and I want to change it to foo and then write to file. After writing to file, the file still have the bar, and not the foo. #include "rapidxml.hpp" #include "rapidxml_print.hpp" void main() { …
waas1919
  • 1,799
  • 3
  • 35
  • 61
1
vote
1 answer

Rapidxml and UTF8

I am using RapidXML, but I need to write my strings as UTF8, in Rapidxml Manual was explained it supports UTF8 , please tell me how can I use it via C++ ISO ?
Behrouz.M
  • 2,987
  • 5
  • 33
  • 61