Hi everyone!
I would like to know how to create a xml file and display it in a fixed location other than the console, I have successfuly create and display it in the console, what I want is to display in the following location C: \ Users \ abdelhalim \ Documents.
I use TinyXML to create the xml file, and my code is as follows:
void crerxmlfichier1::write_simple_doc2(int n,int m )
{
// same as write_simple_doc1 but add each node
// as early as possible into the tree.
TiXmlDocument doc;
TiXmlDeclaration* decl = new TiXmlDeclaration( "1.0", "", "" );
doc.LinkEndChild( decl );
TiXmlElement * root = new TiXmlElement( "TestPlan" );
doc.LinkEndChild( root );
int k=0;
for (int i = 0; i <n; i++){
TiXmlElement * em = new TiXmlElement( "Testeur" );
root->LinkEndChild( em );
++k;
char f[50];
sprintf(f, "%s%d", "N", k);
em->SetAttribute("Node", f);
k=i+1;
char j[50];
sprintf(j, "%s%d", "T", k);
em->SetAttribute("id", j);
}
dump_to_stdout( &doc );
doc.SaveFile( "appsettings.xml" );
}
I'll be very grateful if you can help me.
good day