Questions tagged [tinyxml2]

TinyXML-2 is a simple, small, efficient, C++ XML parser

TinyXML-2 is a simple, small, efficient, C++ XML parser that can be easily integrated into other programs.

106 questions
1
vote
1 answer

Can't use XMLDocument - "incomplete type is not allowed"

I am trying to parse XML content. I want to use XMLDocument but when I use it like that: XMLDocument doc; I receive an error: incomplete type is not allowed When I searched for this issue I found that some places write examples with these…
E235
  • 11,560
  • 24
  • 91
  • 141
1
vote
2 answers

TinyXML2 C++ - Extracting specific data from old/poorly formatted XML files

I'm looking to search within blocks of XML that are rather old (documents dated 1999) and I'm having a little bit of difficulty getting TinyXML2 to operate as intended. I can grab certain snippets but I have issues when there's an element within…
user1992
  • 17
  • 2
1
vote
1 answer

TinyXML-2 error loading file with stylesheet

I have a function to load a xml file with TinyXML-2 library (v4.0.1). It always work fine, but today I see a problem that I don't know how to solve. When I load de file: if ( doc.LoadFile ( "file.xml" ) != tinyxml2::XML_SUCCESS ) It never return…
Safej
  • 73
  • 10
1
vote
1 answer

tinyXml2 causes error C2675 on build - xtree.cs

I get the following three errors after building a project that uses tinyXml2. The errors are shown in the attached image. The offending code can be found in tinyXml2's xtree.cs file, here: template void insert(_Iter _First, _Iter…
OddLogic
  • 11
  • 5
1
vote
4 answers

How to work around C++ pointer-to-member function limitation

C++ has limited ability to use pointer-to-member functions. I need something that will allow me to dynamically choose a callback member function, in order to use the Visitor pattern of the XMLNode::Accept(XMLVisitor *visitor) method from the…
CXJ
  • 4,301
  • 3
  • 32
  • 62
1
vote
1 answer

tinyxml2 - indent with tab instead of spaces

I am using tinyxml2 and the system saves my xmls with 4 spaces for indents instead of a tab. The program that reads this only reads in tabs and is giving me errors. Is there anyway I can change tinyxml2 to use tab instead of 4 spaces ? I have tried…
Kong
  • 2,202
  • 8
  • 28
  • 56
1
vote
1 answer

Parse XML elements in C++

I'm using tinyxml2 and I want to parse some elements from XML in C++. For example I can parse only x in "Second" element. #include #include…
1
vote
1 answer

Load HTML file with javascript using tinyXML2 library

I have an HTML file with Javascript in it. But I am not able to load this HTML file using tinyXML2 library. It is giving error. My html file is like abc.html:
1
vote
1 answer

why do I get NULL pointers with tinyXML2 in C++?

I'm new in the XML-parsing buisness. So sorry for silly questions. I would like to navigate my XML: Gambardella, Matthew XML Developer's Guide
Wing
  • 642
  • 2
  • 5
  • 16
1
vote
1 answer

Tinyxml2 root setattribute

I have been trying to set an attribute for the root in an XML doc using tinyxml2. In tinyxml, the following code TiXmlDocument doc; TiXmlElement * root = new TiXmlElement( "ROOT" ); root->SetAttribute("msg","ImFree"); doc.LinkEndChild( root…
Keivan
  • 673
  • 7
  • 15
1
vote
1 answer

TinyXML 2 data extraction

I have an XML file :
bob87
  • 11
  • 2
1
vote
0 answers

XML package that convert xml/schema file into classes representation with open license

I'm looking for open source package in c++/python that can parse an xml file of schema file (.xsd), and load it into classes based formation so i can easily set/get any field/attribute/etc ... in the document. I've looked in tinyxml2 and Apache xml…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
1
vote
1 answer

Find XML element 'start' and 'end' using tinyxml2 (or other C++ XML library)

I am trying to iterate through the elements of an XML document, and firing events on 'start' elements and 'end' elements. This is pretty straight-forward in using Python's lxml module, and there is even another question on SO regarding this: Using…
1
vote
1 answer

tinyxml2 create file using printer

I am trying to make a xml file using C++ and tinyxml2, to save a games state. Right now I just end up with an empty file, and I don't know why. Any help would be appreciated. FILE * pFile; pFile = fopen ("test.xml","w"); XMLPrinter…
Waltari
  • 1,052
  • 1
  • 30
  • 64
1
vote
1 answer

tinyxml2 : how to know number of characters read successfully from a stream buffer

I am using tinyxml2 interface to read xml data from stream buffer. How can I know number of characters successfully read by tinyxml2 interface.