I am trying to decode a string using tinyxml and so far, the only way i can do that is to load the string into a document before i am able to decode it. Is there any other way? loading it to a file is extremely slow as the xml string is being sent through the port to my program at an extremely fast rate. If it is not possible, are there an other xml libraries that will let me do that? Hope that someone can help me as soon as possible!!! thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ok.. I implemented a quick fix solution to the issue. here's wat I did
1. suppose the xml data received over the socket is in the variable 'msg'.
2. created a TiXmlDocument doc with a random input file name "tmp.xml"
3. then do doc.Parse(msg);
The data in the msg is now part of 'doc' an you can use doc like you would after reading from an input file!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I want to parse a xml file using tinyxml and put all the information into a data structure so that I can use it in another function. Can anyone have any idea or suggestion how I can do it. I am really new in tinyxml and C++.
Thanks
Sagar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to decode a string using tinyxml and so far, the only way i can do that is to load the string into a document before i am able to decode it. Is there any other way? loading it to a file is extremely slow as the xml string is being sent through the port to my program at an extremely fast rate. If it is not possible, are there an other xml libraries that will let me do that? Hope that someone can help me as soon as possible!!! thank you!
ok.. I implemented a quick fix solution to the issue. here's wat I did
1. suppose the xml data received over the socket is in the variable 'msg'.
2. created a TiXmlDocument doc with a random input file name "tmp.xml"
3. then do doc.Parse(msg);
The data in the msg is now part of 'doc' an you can use doc like you would after reading from an input file!
It is easy to use in-memory construction
TiXmlDocument doc ( charpointer );
or
TiXmlDocument doc ( xmlstring.c_str() );
Hi, I want to parse a xml file using tinyxml and put all the information into a data structure so that I can use it in another function. Can anyone have any idea or suggestion how I can do it. I am really new in tinyxml and C++.
Thanks
Sagar