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

Requiring existence of XML elements without schema in TinyXML

I am trying to implement a short converter using TinyXML that will take an XML file (with fixed format), parse it, and populate a protobuf object with the elements. Problem is, some elements are optional in the protobuf definition and TinyXML does…
recipriversexclusion
  • 13,448
  • 6
  • 34
  • 45
0
votes
1 answer

TinyXml save-formatting when using CDATA blocks

If I have this test code: TiXmlElement *parentElem = new TiXmlElement("ParentNode"); TiXmlElement *newElem = new TiXmlElement("TestNode"); TiXmlText *textElem = new TiXmlText("Test Content"); //textElem->SetCDATA(true); …
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
0
votes
1 answer

Exception thrown at 0x00007FF746DA221B SDL_game.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF

I am trying to debug my application and I constantly receive this error and I don't know how to fix it. While debugging I found out that the place of the error is the function parseObjects. It also invokes a create function from the game object…
E. Enev
  • 13
  • 1
  • 5
0
votes
1 answer

Cannot convert from const TiXmlString to const std::string&

I am willing to make a 2D game with SDL and I am following a Shaun Mitchell's book. But I faced serious difficulties with this user-defined type conversion error when trying to compile my project... Also, I am unfamiliar with this topic. I've…
E. Enev
  • 13
  • 1
  • 5
0
votes
0 answers

avoiding tags on tinyxml

I'm using tinyXML to parse my XML documents, but I'm having a problem since I'm not a expert on it. Considering this XML structure: text1 ... text4
Lolo
  • 7
  • 1
  • 7
0
votes
1 answer

TinyXML load string from file

is it possible to load strings from tinyXML file to string variable in application because when I'm trying to do that I received some bugs. if (fall->QueryFloatAttribute("particle_texture", std::string name_) != XML_NO_ERROR) return…
David
  • 39
  • 9
0
votes
1 answer

Segmentation Fault using Tinyxml

I'm trying to read an Xml file recursively using Tinyxml, but when I try to acces the data I get a "Segmentation Fault". here is the code : int id=0, categoria=0; const char* nombre; do{ ingrediente =…
Rocafort8
  • 15
  • 3
0
votes
1 answer

TinyXml capturing white space / paragraphs

Tiny XML has been great so far but I'm having what I feel like is a really basic problem but it's been stumping me pretty bad... What I need to do is just take input from Cin and put it into the TiXmlElement and TiXmlText classes. I can't seem to…
Terra
  • 1
0
votes
0 answers

How to merge multiple xml files with tinyxml

I have multiple xml files that are structurally identical, looking like this: firstFile.xml Empire Burlesque Bob Dylan
mdk
  • 6,225
  • 1
  • 25
  • 30
0
votes
1 answer

How to get parent node of element using tinyxml

Is there a way to get a parent node from a TiXmlElement? For example... TiXmlElement *parent = child->ParentElement( "someName" ); If you can't do this in tinyxml, are there any other xml parsers that allow this?
random
  • 183
  • 13
0
votes
0 answers

TinyXML can't read some files

I can load a file applicationHost.config just fine in one…
TruthOf42
  • 2,017
  • 4
  • 23
  • 38
0
votes
0 answers

tinyXml no-English characters

I'm working on a C++ MFC project on VS 2013. I'm using TinyXML library, utf-8 encoding. I insert non-English characters like дąć and save the file. When I try to open this XML file TinyXML tell me there is an error: Error #9: Unable to read end…
szpryc
  • 21
  • 4
0
votes
1 answer

How to add !DOCTYPE at top of xml file generated from tinyxml?

I generated an "my_test.xml" file by making use of tinyxml, till now all has went fine but now i want to validate this against "my_test.dtd" DTD and want to add following line in the starting of "my_test.xml":
anamika email
  • 327
  • 9
  • 21
0
votes
1 answer

Tinyxml - How to export multiple file

Hi everyone :) I develop program that export .xml file (Android dimens file). My Program will export dimens_ldpi.xml, dimens_mdpi.xml, dimens_hdpi.xml, and dimens_xhdpi.xml. Easy to say, I want to export multiple file of the same structure. But I…
Soyeon Kim
  • 608
  • 7
  • 34
0
votes
2 answers

TinyXML and fetching values

I'm trying to load data from xml-file with TinyXML (c++). int height = rootElem->attrib("height", 480); rootElem is a root element of loaded xml-file. I want to load height value from it (integer). But I have a wrapper function for this…
Max Frai
  • 61,946
  • 78
  • 197
  • 306