Questions tagged [tinyxml]

TinyXML is a simple, small C++ XML parser and generator library.

TinyXML is a simple, small, C++ parser that can be easily integrated into other programs. It is released under the ZLib license.

In brief, TinyXML parses an XML document, and builds from that a Document Object Model (DOM) object that can be browsed, manipulated and serialized within your C++ code. TinyXML also allows you to construct an XML document from scratch with C++ objects and write this to disk or another output stream.

TinyXML is designed to be easy and fast to learn. It consists of two headers and four source files which can either be compiled into your binary or built into a static library.

TinyXML attempts to be a flexible parser, but with truly correct and compliant XML output. It should compile on any reasonably C++ compliant system, does not rely on exceptions or RTTI, and can be compiled with or without STL support. TinyXML fully supports the UTF-8 encoding, and the first 64k character entities. However, TinyXML doesn't parse or use or .

219 questions
0
votes
1 answer

Why it's not parsing correctly the XML file?

I want to get from a xml file the name of a file, but it seems that it is not storing any information about the file. Struct to store the name of the file(or files later): struct Document{ std::string file1; std::string file2; …
Bruno
  • 43
  • 11
0
votes
1 answer

using TinyXML Parsing XML Elements - Infinite loop

I want to read an xml file where several tests are found, but I always get the first one and it does not come out of the loop. If I do an iteration well, but when I do the bubcle, I can not move on to the next test. And if I use // pBodys = pRoot->…
DANIEL
  • 5
  • 2
0
votes
2 answers

Need Different links for xml parsing

a new bie here ... can anyone tell me links of good examples or good tutorials regarding different kinds of xml parsing?? these are the types I have figured out from somewhere .. NSXMLParser libxml2 TBXML TouchXML KissXML TinyXML GDataXML I…
Jean-Luc Godard
  • 1,873
  • 3
  • 28
  • 53
0
votes
1 answer

TinyXML2 - Trouble Getting Started

I'm just getting started with the XML parsing library, but I'm having trouble getting started. (The learning curve, I guess) More specifically, I'm dealing with an exception when trying to get an element and use it. Right now I have this…
0
votes
0 answers

Iterate whole XML file using TinyXML

I have some XML file's but there is one problem. My XML "tree" doesn't have one look. I mean once it can look like: But second time…
ProStyled
  • 11
  • 4
0
votes
2 answers

How to use Attribute as search keyword with TinyXML2(C++)

I'm trying use Attribute as keyword to find Element I want. it can work but only when it is first element. bool readXML(){ string gateWay_str="",user_Input=""; XMLDocument XML_file; XML_file.LoadFile("exception_ip.xml"); //XML…
LocoOcelot
  • 65
  • 7
0
votes
2 answers

TinyXML2 Parse data within the same element in C++

I have an XML file like this: 89220.4892904 52914.9322014 8229.6 0 0 4.36332312999 0 0 70.0 270.741736633 0
tegginamaniss
  • 151
  • 10
0
votes
0 answers

Save the .xml file using TinyXml

I want to make an xml file and I am using tinyxml to create it. I am using this code that was already online but it does not save the file. #include "tinyxml.h" int main() { build_simple_doc(); return 0; } void build_simple_doc( ) { //…
shreeya
  • 145
  • 1
  • 14
0
votes
1 answer

Get TinyXML to parse just one node

I am trying to figure out how to give TinyXML a buffer or file which contains more than one XML node, and have it parse only one of them at a time. It appears that TiXmlDocument::Parse() has some functionality for this, since it returns back a char…
spurserh
  • 583
  • 3
  • 17
0
votes
2 answers

linking problem tinylibxml C++ Ubuntu

I am getting error when I try to execute the simple tinylibxml program. OS -> Ubuntu IDE -> e I have download libtinyxml through apt-get install and included the header in my program But I am still getting error Sample code is pasted below #include…
samprat
  • 2,150
  • 8
  • 39
  • 73
0
votes
2 answers

tinyxml and c++ to save data

I am using tinyxml to save data input by the user in a c++ console program. I pass a save function an array of structs that look like the following struct day { string name; string note; }; I have seven of these, and pass all seven to…
Bear
  • 486
  • 2
  • 8
  • 16
0
votes
1 answer

How can I read all data from the XML file using TinyXML

I want to read XML-data using TinyXML. I have the following XML-file: Vlaardingen NL
0
votes
1 answer

TinyXml2 XMLDocument parse after create new Element crash

In TinyXmlv1 i can create a temp Xml Element then Parse document by TiXmlDocument doc; TiXmlElement * element = new TiXmlElement( "Hello" ); TiXmlText * text = new TiXmlText( "World" ); element->LinkEndChild( text ); doc.Parse(""); //…
xfr1end
  • 303
  • 5
  • 8
0
votes
1 answer

What is the alternative to `TiXmlNode::FirstChild(const char *)` in TinyXML-2?

I am updating code that uses the legacy TinyXml library, to use new TinyXML-2 version instead. While editing, I noticed that the function TiXmlNode::FirstChild(const char *) has no direct replacement in TinyXML-2. My questions are: Is there a…
user7023624
  • 571
  • 5
  • 14
0
votes
2 answers

Object pointer randomly points to 0x00000

I'm running a Visual C++ MFC application in release mode. I'm compiling everything using Visual Studio 2010. My app runs a mini CNC mill through USB VCP communication. I have a XML file that stores the app's settings. My problem is this:…
Dan G
  • 165
  • 1
  • 13