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

RapidXML saving into a File

I have googled it and I have a problem saving my xml_document<> doc in a .xml file. This Code shall save Chess Games Notations as XML file which I will put in a compressed file for adding multimedia files into it. So someone can add Audio Comments…
SepGuest
  • 127
  • 1
  • 11
1
vote
1 answer

Trouble building RAPIDXML library on a computer - error messages

I am working on a c++ project where I would like to use the rapidxml library. The library can be found here: http://rapidxml.sourceforge.net/ I downloaded this (4 source code files .hpp) and was able to compile the project on my windows machine with…
code
  • 5,294
  • 16
  • 62
  • 113
1
vote
1 answer

RapidXML does not parse when called with script

I have a folder being watched with iNotify. When a file is created in the folder, the watcher takes the file, renames it (with mv), and then moves it to another folder. A RapidXML program is then called with a bash script and is suppose to parse the…
Cornel Verster
  • 1,664
  • 3
  • 27
  • 55
1
vote
1 answer

Rapidxml and start tags

I am having a few problems with rapidxml. When I compile my code no start tags are included..any and all help will be greatly appreciated int main(){ xml_document<> doc; //xml declaration xml_node<>* decl =…
1
vote
1 answer

How to read a utf-8 string from an xml using rapidxml?

My question is same as this unanswered question ? How to read Unicode XML values with rapidxml But the content of my XML is encoded in UTF-8. I am a newbie to MS Visual Studio, C++. My question is, How do we read an UTF-8 string into a wchar_t type…
Koustav Ghosal
  • 504
  • 1
  • 5
  • 16
1
vote
2 answers

Building a Tree from XML File using RapidXML and c++

For a project for my c++ class, I am supposed to parse and xml file and build a binary tree from it. The file is much more dense than this but the layout is as follows:
user2067100
1
vote
1 answer

Parsing using RapidXML

I hve an XML file which I am supposed to parse using RapidXML and c++. The file is a Phylogenetic tree. Each node has a node with 1-3 child nodes that each have values. The nodes can be the scientific name, common name, or rank. My question is,…
user2067100
1
vote
1 answer

Parsing an XML file in C++ using RapidXML with Dev C++

So I have to parse an XML file for my C++ project in class and I'm using RapidXML. The rapidxml_iterators.hpp file is giving me some troubles. I'm using Dev C++ by the way At first, I had the following code: typedef typename xml_node
1
vote
3 answers

Errors with returning datatypes other than char* from XML-file using C++

It's my first time using XML and I am currently trying to return an integer (actually want to return a double but haven't got that far yet) from an XML-file using C++. I'm using RAPIDXML and the following implementation: All files are in the same…
Paul
  • 13
  • 3
1
vote
2 answers

rapidxml first_node doesn't return null

I'm trying to parse a XML file using RapidXML in C++, the file is like: 1111 2222 3333 To identify the parent nodes I'm…
user1472839
1
vote
1 answer

rapidxml unexpected type alloc_func

I am using rapidxml to parse and create xml-files in my projects. Problem is that in one project it worked fine, and in another I got rapidxml.hpp(385): error C2226: syntax error : unexpected type 'alloc_func' Error. is there any quick fix for this…
unresolved_external
  • 1,930
  • 5
  • 30
  • 65
1
vote
1 answer

Navigating along rapid.xml nodes

This question slightly differs from check for variable number of sibling nodes & different siblings in Rapidxml. In most of the examples I have found on the web I see hard coded keys, for example: xml_node<>* root = doc.first_node("rootnode"); Here…
Rajesh
  • 11
  • 1
1
vote
1 answer

Input from xml file and parsing using rapidxml

I am trying to do something like this using rapidxml using c++ xml_document<> doc; ifstream myfile("map.osm"); doc.parse<0>(myfile); and receive the following error Multiple markers at this line - Invalid arguments ' Candidates are: void…
jj 1
  • 25
  • 8
1
vote
1 answer

check for variable number of sibling nodes & different siblings in Rapidxml

I am using Rapidxml in c++ to read in a xml file I have two questions based on the following example
jj 1
  • 25
  • 8
1
vote
1 answer

rapidxml - overwriting previous xml_nodes

I just started using rapidxml. I 1st create an xml file to read from. Worked so fast an easy. This is what I manual crated.
Flowing
  • 13
  • 3