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
0
votes
1 answer

Rapidxml causing weird problems

Iam having problem with rapidxml. Code below gives me output: http://pastebin.com/352MxuQY But when I remove loop or "{}" where Iam appending node I get good output: http://pastebin.com/H0YQGwV1 Why is this happening? rapidxml::xml_document<>…
-1
votes
2 answers

Can RapidXML API grow the buffer?

Seeing the documentation of XmlDocument::parse(Ch*) in RapidXml, i'm left wondering about the character buffer being 'non const'. I'm not sure how this is going to work in general when the buffer needs to grow by any such modifications of the…
lurscher
  • 23,085
  • 26
  • 113
  • 178
-1
votes
1 answer

Rapidxml next_sibling not return the next sibling

I want to select the "actual" xml node by attribute. When I try to iterate trough the nodes, it only return the first one, but strangely, when I ask the last node, it will return it without any problem. Also, if I search it with name like…
Bady
  • 56
  • 8
-1
votes
1 answer

How to create a xml node using rapidxml

Hi I want to create the following xml file in C++ using rapidxml on Linux. How to add an element which is of type name. something1 what my code generates looks…
punith
  • 1,169
  • 1
  • 13
  • 17
-1
votes
1 answer

Segmentation fault when using rapidxml::xml_node::first_attribute

I'm learning to use rapidXML, but when I try to read big XML file(I posted it on pastebin, because it more than 400 lines long) I get Segmentation fault on line 78 when it loops 4th time, so I thing it is something like small buffer, but I have no…
Matěj
  • 1
  • 1
  • 2
-1
votes
1 answer

Issue in Parsing large XML(size greater than 65 KB) file using RapidXML

My XML File size is 252 KB. where I Try to search using fisrt_node function using the below statement root_node = doc.first_node("cdf",0,false); where cdf is my root node then the program crashes giving segmatation fault error. if I search node…
dheeraj
  • 7
  • 4
-1
votes
1 answer

Rapidxml reading Cyrillic from COM object

I'm trying to parse XML file which contains Cyrillic letters, and I receive Parse error: "unexpected end of data" Here is the code that I use to parse, and the catch statement that I enter in. rapidxml::xml_document
Mario
  • 87
  • 2
  • 9
-1
votes
1 answer

xml_node I'm using rapid xml to print the XML document to a file

I'm trying to print a xml to a file using rapidxml . But the values are in wstring. So i've used templated version of it by attaching xml_node wchar_t instead of specialization of the xml_node . But When i'm doing this: std::string…
-1
votes
2 answers

rapidxml - how do I create an array of xml_document(s)?

I have multiple documents to parse and I need access to all the document objects for the lifetime of the creating class. How do I create an array of xml_document pointers as a member variable? I've tried creating a single member variable as…
tfont
  • 3
  • 2
-1
votes
1 answer

Program halt when constructing std::string

In the following code, when constructing the string url, the execution halts. No error, the execution doesn't stop, it just hangs there, and I can't press step over. Everything seems fine in the debugger, no nullpointers, the baseURL is set…
Innkeeper
  • 623
  • 1
  • 9
  • 21
-2
votes
1 answer

RapidXML - Code creates unexpected result

I have the following XML
-6
votes
1 answer

I get unwanted data when I save a file with Rapidxml

Simple function to create a declaration node at the beginning and an elementNode named "List", containing 26 elementNodes each named "IP" with a random IPv4 address in string data type as value of the node. The Random ip come from a storage vector…
1 2 3
11
12