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.

182 questions
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
  • 21,488
  • 17
  • 97
  • 161
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
  • 2,365
  • 7
  • 44
  • 76
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
  • 3,445
  • 6
  • 37
  • 64
1
vote
1 answer

c++ rapidjson addMember & rapidxml

When I use the function AddMember from the c++ library RapidJson and I use string as parameters Everything Work fine jsvalue.AddMember("Fare", "0", allocator); but when I try to use a Function of RapidXml as parameter to get the node name, I get a…
user2942945
  • 469
  • 1
  • 7
  • 19
1
vote
2 answers

C++, RapidXML: function to get total of siblings nodes

for example: It must return 2, I thought about using, for this example: int Get_total_x(){ int total=0; for(xml_node<> *x=root_node->first_node("x"); x; x=x->next_sibling()){ …
1
vote
1 answer

RapidXML: Segfault; first_node() returns NULL

I've tried a few things and am arriving at the same place. Basically after calling first_node() I get NULL or nonsensical binary which messes up xterm which then I need to close and reopen. Firstly getting the data. I did this two ways 1. RapidXML…
Nolan Robidoux
  • 395
  • 2
  • 17
1
vote
1 answer

C++ rapidxml access violation after a certain amount of time (visual studio 2013)

I have been using the excellent rapidxml library to read and use information from XML files to hold cutscene information for a game I am programming in C++. I have run into an odd problem, I start by loading the XML file into a…
deery50
  • 65
  • 1
  • 5
1
vote
1 answer

Get child count from rapidxml:xmlnode to get random child node

I can turn my XML document file into rapidxml object: if(exists("generators.xml")) { //http://stackoverflow.com/a/12774387/607407 rapidxml::file<> xmlFile("generators.xml"); // Open file, default template is char xml_document<> doc; …
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778
1
vote
1 answer

how to use rapidxml get all string inside

if I have xml content as below hello world I would like to get value as string which have all data inside or let say string all_data =…
Denny
  • 449
  • 4
  • 17
1
vote
2 answers

how to get value inside node

if i have xml content 1111222333 Then how to get value which is "1111" and "333" but I only can get value of first node which is "1111" only Please advise code is here #include #include…
Denny
  • 449
  • 4
  • 17
1
vote
1 answer

how to fill .xml document using rapidxml C++

I am trying something like this, #include "stdafx.h" #include "rapidxml.hpp" //#include "rapidxml_iterators.hpp" #include "rapidxml_print.hpp" #include "rapidxml_utils.hpp" #include #include using namespace rapidxml; int…
amani
  • 21
  • 1
  • 2
1
vote
3 answers

Compilation errors with RapidXML

I am novice to rapidXML but first impresion was not positive, I made simple Visual Studio 6 C++ Hello World Application and added RapidXML hpp files to project and in main.cpp I put: #include "stdafx.h" #include < iostream > #include < string…
milan
  • 11
  • 1
  • 3
1
vote
1 answer

RapidXML node exception handling

I'm using RapidXML to parse a xml file containing some variables that I'd like to use in my C++ program. I am abled to read valid nodes but I'd like to add some error handling if a node name is misspelled for example. Here is a working example of my…
nbon
  • 2,735
  • 2
  • 16
  • 15
1
vote
1 answer

RapidXML - how can I handle missing nodes/values

I'd like to read from XML to C++ using RapidXML. However, if a node doen't exist or a value is missing the program crashes. for (rapidxml::xml_node<> * xmlasset_node = root_node->first_node("Asset"); xmlasset_node; xmlasset_node =…
Corak55
  • 63
  • 5
1
vote
1 answer

boost/rapidxml parse crash

We're using boost/rapidxml for XML parsing in a pub/sub broker implementation and for a certain XML payload, the broker crashes. To eliminate as many variables as possible, I have implemented a short test program doing only the XML parse, and the…
kzangeli
  • 403
  • 2
  • 8