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
0
votes
1 answer

How to read XML element using tinyxml2 in C++?

I am trying to read config.xml with following simple content: cs en
Amateur
  • 43
  • 6
0
votes
1 answer

how to make user enter the path of the xml file in tinyxml2

How i can make the user enter the path of the xml file to be saved? I want the user to enter something like "c:\test.xml" and the xml file is generated by that name and location. I tried string PathName; cin >> PathName; XMLDocument…
Alice
  • 15
  • 3
0
votes
0 answers

TinyXML2 could not parse a XML file witch contains utf16 encoding

I try to use tinyxml2 lib to parse my xml file, which contains some text displays as Chinese language, while, when I got the result, it shows something wrong. How should I do, anyone can help?
0
votes
0 answers

After valid the data how to get data from xml file?

I write a program , and i used the (regex) operation and the valid a xml pattern ... but after validate how to store the data from the string and store it into the xml file and how to grab data from the xml file, i can not implement this please help…
ArkaMondal
  • 35
  • 3
0
votes
2 answers

Change multiple XMLElement text with TinyXML2

I was able to follow example code to change 1 element value but dont know how to proceed changing other elements text. void setXML(unsigned short voltage_value, unsigned int current_value){ XMLError eresult = xmlDoc.LoadFile("SavedData.xml"); …
Elcast
  • 59
  • 2
  • 8
0
votes
0 answers

tinyxml2 to support wchar,rewrite funtion Print

My colleague modify the tinyxml2 source code to deal with wchar(tinyxml2.2.0 version),Here is the code bellow,actually the code will only run in liunx,so the windows part should not concern. The code bellow whichi my colleague write,the comment…
J.Doe
  • 319
  • 1
  • 8
0
votes
1 answer

Why is tinyxml2 failing to parse a Traffic Server xml file?

Using tinyxml2, I'm trying to parse this Traffic Server config file:
firebush
  • 5,180
  • 4
  • 34
  • 45
0
votes
2 answers

Why is TinyXML2's XMLDocument::FirstChild() function returning NULL when attempting to parse this valid XML file?

I know there's probably some extremely obvious thing I'm missing here, but this has been driving me crazy for a few days now. Here is a simple function I've written that is just supposed to find the first tag in the XML document for now: void…
Matt D
  • 11
0
votes
1 answer

How can I transfer my data (XML) over UDP?

I used a library called TinyXML2 for creating my XML file that has all the data in it. Now I want to transfer my XML file over UDP. I know that I have to transfer node by node in my XML file. But I don't know the exact procedure. Can anyone tell me…
Venkatavaradhan
  • 139
  • 4
  • 13
0
votes
0 answers

TinyXML - GetText() with multi-level Element file

I have an XML file of which I need to extract data from. I use tinyxml2. I tried to get the text of an element in the file. The data in the file looks like this:
0
votes
2 answers

XML GetText from element with attribute

I want to GetText from specific element and attribute from XML using Tinyxml-2, but I cant do it. My XML like below: AAA/entry> BBB My…
Mesut KAYA
  • 35
  • 6
0
votes
1 answer

Changing the contents of a tag using TinyXML2 C++

I want to do this: Load a file. Find an element in it with it's attribute value like I want to find the dog tag with colour as brown. <dog colour="brown"> Then I want to change the contents of the tag. For example: from <dog…
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
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
1 answer

TinyXML2 get text from node and all subnodes

How does one go about getting the text from the nodes and subnodes in TinyXML2? The XMLPrinter class seems to do what I need, but it does not print the text properly. My XML:
The quick brown fox jumps over the lazy dog.
My…
user6629350