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

tinyxml2 can't load my xml file

I'm using tinyxml2 in my after effects plugin to parse xml files. But I can't seem to get the XMLDocument object to load my xml file. The "loadFile" function can read the whole content of my file. but when I call the "toText" method, it returns…
1
vote
1 answer

Using tinyXml2 in a C++ project

I am new to tinyXml2. I am trying to parse an xml file and print the text in the root tag. this is my code. #include #include "tinyxml2.h" using namespace std; int main() { XMLDocument doc; doc.LoadFile("input.xml"); const…
user1926586
  • 11
  • 1
  • 2
1
vote
1 answer

TinyXML2 C++ Import

I've got a XML File looking like: Year1 Month1 Day1 Year2
1
vote
3 answers

TinyXML2 query text if attribute matches

I am trying to figure out a way to load the text from an XML document I have created using TinyXML2. Here is the entire document.
Pladnius Brooks
  • 1,248
  • 3
  • 19
  • 36
0
votes
1 answer

Converting CString to UTF-8 with CT2CA is corrupting some characters

I am trying to write this value to a UTF-8 XML encoded text file: Estudante - Leitura da Bíblia I am using a lambda function: auto AddLabel = [](tinyxml2::XMLDocument& rDoc, tinyxml2::XMLElement* pLabels, LPCSTR szElement, CString strValue, int…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
0
votes
0 answers

How can i fix error LNK2038 after adding tinyxml2?

I have a project that compiles normally and i need to use tinyxml2 library in it, but when i add it there appears 2 linking errors Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' error LNK2038: mismatch…
Goldie- 5
  • 1
  • 1
0
votes
1 answer

Why does TinyXml2 put XMLDeclaration at the end?

I'm using TinyXml2 v8.0.0 to create an XML buffer to send to an API. The example includes a declaration. I'm implementing this with: XMLDocument doc; doc.InsertEndChild(doc.NewDeclaration()); XMLElement* pRoot =…
parsley72
  • 8,449
  • 8
  • 65
  • 98
0
votes
1 answer

Why is using tinyxml2-ex::text returning corrupted text?

I am trying to use the tinyxml2-ex library to read some XML data. When I try using it's specific API call: const CString strNameToUse(tinyxml2::text(pAssign).c_str()); The resulting string loses things like accents. In the end I have reverted to my…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
0
votes
1 answer

What is the equivalent of TiXmlAttribute for tinyxml2 and how to use it?

I've encountered a problem that I'm not being able to solve using tinyxml2. I have a function that receives as a parameter a XMLElement and I need to iterate over its attributes. With tinyxml, this worked: void xmlreadLight(TiXmlElement* light){ …
John Mulaney
  • 109
  • 9
0
votes
0 answers

C++ Builder and TinyXML2

Good evening, I am using tinyXML2 for parsing my XML-Files. I am using C++ builder 10.4. from embarcadero. So my problem is. that the classes of tinyxml return text as char* Arrays. So for example: AnsiString mytext = node->GetText(); where node is…
Hoeh
  • 45
  • 4
0
votes
0 answers

merge xml files using tinyxml2 in C++

Now I'm using tinyxml2 library for merge several xml files. I want to checking xml files in same folder(I will use absolute path). And when I combine several xml files, I will remove the duplicates and merge them by comparing the values of…
Markus
  • 1
  • 1
0
votes
1 answer

tinyxml2 how to Load the XMLDocument from a file containing both xml text and binary data

I need to create a special purpose file format which should have an XML "header" and a large chunk of binary data after this header. I would like to use the tinyxml2 library to parse the xml. After that, I shall pull the binary data into a single…
bekoch
  • 1
  • 1
0
votes
0 answers

How to append two xml file in tinyxml2

I have two XML file. first.xml
Ratnesh
  • 1,554
  • 3
  • 12
  • 28
0
votes
1 answer

Convert Arduino fs:File* into c++ std::File*

it seemed too easy. I stored an xml file on a sdcard connected to my esp32. I use the SD.open() function to access the files stored on the sdcard. For parsing the xml file I downloaded the tinyxml2 library and tried to use the xmlDocument.LoadFile()…
0
votes
0 answers

tinyxml removes spaces before slash in self closing tags?

Tinyxml is changing my XML file by removing spaces before the end of self-closing tags, which causes an error in my program. Here is an example of the tag before it gets processed by tinyxml And here is it afterwards:
Ke.
  • 2,484
  • 8
  • 40
  • 78