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

Storing class members as RapidXML data types

I'm having an issue with storing member variables that are of RapidXML datatypes. I also experience this problem with member functions' return types. Only in the class' file header to I experience this issue. Using these datatypes within functions…
hrr4
  • 3
  • 2
0
votes
1 answer

Weird result with rapidXml in C++ append_node

I have this class: // XmlWrapper.h class XmlWrapper{ private: xml_document<> doc; public: XmlWrapper(); string addNode( string node_name); string getXmlString(); }; //…
Kingfisher Phuoc
  • 8,052
  • 9
  • 46
  • 86
0
votes
2 answers

Error while parsing Japanese Kanji with RapidXml

I have a problem when I try to parse a xml file containing a specific Kanji: 退 After debugging, I see that the problem is in this function of RapidXml : struct text_pure_no_ws_pred { static unsigned char test(Ch ch) { return…
Rodrigue Rens
  • 277
  • 3
  • 8
0
votes
1 answer

Error while parsing a Xml file with RapidXML

I have a "parse_error" when I try to parse an xml file containing a specific Japanese kanji: 退 If I change this Kanji to another, the parsing works well. Any idea? PS: I parse the file with rapidXML Here is a sample of the xml file:
Rodrigue Rens
  • 277
  • 3
  • 8
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
  • 25,930
  • 29
  • 122
  • 185
-1
votes
2 answers

What is wrong with this recursive function for searching a word match inside a non binary tree?

I have this snippet of code inside my project that has to search for an exact match inside an XML tree parsed with RapidXML. It does find the match but at the end it's always a null pointer match. I can't figure out the order in which I should code…
-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,249
  • 1
  • 15
  • 18
-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
  • 10
-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
  • 663
  • 1
  • 10
  • 22
1 2 3
12
13