I want to convert tinyxml document file into string. I have found on google as well as tinyxml document but I haven't solve it. What I have done so far is
If your question is to read a *file* into a string (that is, *not* about taking a TiXmlDocument and putting it into a string) then google for fopen(), mmap, and ifstream. My personal favourite method is mmap but its not always practical.
HTH
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I want to convert tinyxml document file into string. I have found on google as well as tinyxml document but I haven't solve it. What I have done so far is
TiXmlDocument doc("xyz.xml");
TiXmlElement * root = new TiXmlElement( "login" );
root->SetAttribute("username","name");
root->SetAttribute("password", "pwd");
doc.LinkEndChild(root);
doc.SaveFile();
String str = "";
I want to insert the file xyz.xml data into this string str. If it is char*, then it is also ok. Can anybody help me?
Regards
If your question is to read a *file* into a string (that is, *not* about taking a TiXmlDocument and putting it into a string) then google for fopen(), mmap, and ifstream. My personal favourite method is mmap but its not always practical.
HTH