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
2 answers

How to search for a node in tinyxml ? [Qt,C++]

Hi i have another question. The program needs to read an xml file, put the unit and test sections on the qtree widget with a tree hierarchy. So far i am able to write the desired sections on the qtreewidget and write the test steps when clicked on…
Ashtaroth
  • 47
  • 10
0
votes
1 answer

Avoid escaping \" to " in tinyxml writing in C++

I use tinyxml to write xml files. For a tag I want to write "", but when I use following codes TiXmlElement *tag=new TiXmlElement("tag"); TiXmlText *text=new TiXmlText("\"\""); The content will be "". If I…
mrmoment
  • 727
  • 2
  • 10
  • 34
0
votes
1 answer

TinyXML2 - insert element in middle of XML

I'm looking to add new elements with data to the middle of my XML structure. How can I append them where I need them? Current code: XMLElement *node = doc.NewElement("timeStamp"); XMLText *text = doc.NewText("new time…
Colin747
  • 4,955
  • 18
  • 70
  • 118
0
votes
1 answer

Parsing XML elements using TinyXML?

I am trying to parse an xml file and obtain certain attributes from it to store. I can successfuly parse the document if every element is present, but in some instances an element is not present for a specific node, and because of this I receive a…
0
votes
1 answer

how to get CDATA in xml file using tinyxml library. If possible give a 2-3 line code snippet?

how to get CDATA in xml file using tinyxml library. If possible give a 2-3 line code snippet?
narenra
  • 1
  • 2
0
votes
2 answers

Blindly parse XML page for specific tags

I'm having trouble using TinyXML2 to blindly parse a XML page for specific tags. Basically, I am asked to parse via C++ an HTML page. I use the (quite old) tidyHTML library to firstly "translate" my HTML pages into XML ones. Then, I want to use…
Gyromitre
  • 1
  • 3
0
votes
1 answer

TinyXML issue with VC++

I am collecting netstat information. the program is working but when in tinyxml for tag it shows null while in console application same program runs successfully char command[50]; TiXmlElement* msg31 = new TiXmlElement( "Port" ); TiXmlElement…
user3505712
  • 895
  • 1
  • 11
  • 20
0
votes
2 answers

Visual Studio 2005 and Tinyxml - xml file location

For some reason my Tinyxml file which is created via visual studio 2005 (c++) is saved on my desktop instead of the debug folder or in the program's root folder. if anyone knows about some way to tell vs2005 to save the tinyxml create file somewhere…
shaimagz
  • 1,265
  • 4
  • 17
  • 39
0
votes
1 answer

Linking Errors tinyxml on OS X 10.9.2

I would like to use tinyxml. I have used it in the past, and it works great. The only problem is I was developing on my Linux box which is a laptop. I have a mac mini and I have that set up as my desktop, so I would like to use it for a big chunk of…
Noah Herron
  • 630
  • 4
  • 23
0
votes
1 answer

TinyXML2 doesn't seem to load my file correctly?

I am just starting to use TinyXML2 so I am probably doing something wrong. Anyway: tinyxml2::XMLDocument txDoc; tinyxml2::XMLElement *rootnode; XMLError err = txDoc.LoadFile(xmlFile.c_str()); // err says no error. rootnode =…
user1539405
  • 111
  • 1
  • 14
0
votes
1 answer

Can tinyXML-1 open files on Android?

TinyXML-1 can't open file. File exist on that path, but xmlDoc.ErrorDesc() writes Failed to open file. Can tinyXML1 open files on android or I must use Tinyxml2?
JustOneMan
  • 231
  • 1
  • 9
  • 34
0
votes
1 answer

Using TinyXML to parse XML file string

I have a library that contains a default XML file represented as a const char * stored byte by byte. I want the user to be able to request a handle to this file (as a TiXmlDocument). Currently, I'm trying to do this by passing this string…
Nealon
  • 2,213
  • 6
  • 26
  • 40
0
votes
2 answers

Is it possible to undefine a class in C++ (Visual Studio)?

I know, it may seem strange, but my goal is to undefine a class in C++. The root of the problem is in combining TinyXML2 and Boost unit tests. Contents of the header file (Configuration.h) which is being tested: ... #include ... And…
Cruel_Crow
  • 359
  • 3
  • 15
0
votes
1 answer

TinyXML Element extraction as text

I'm trying to create an XML signature mechanism. my XML can be something like below:
... ...
In fact it would be agnostic to the kind of data below the Main node. And I only…
alexbuisson
  • 7,699
  • 3
  • 31
  • 44
0
votes
1 answer

tinyxml. Get full text of node (or "raw content")?

My question differs from others. In other questions people ask how to get a text inside node excluding of inner tags. For example, I have the following xml: 123 14 If I request a full…
user2083364
  • 744
  • 1
  • 7
  • 20