I work with a simple (small) XML structure as for exemple :
- Code: Select all
Poco::AutoPtr< Poco::XML::Document> data;
data->appendChild( data->createElement( typeid( *this).name()));
data->documentElement()->setAttribute( "creation", _creation.toString());
data->documentElement()->setAttribute( "emission", _emission.toString());
and i want simply :
- convert the full XML document to a string :
- Code: Select all
std::string s = data->toString();
- reload the XML document from the previous string :
- Code: Select all
data->fromString( s);
- save the XML document to a disk file :
- Code: Select all
data->saveToFile( "c:\dump.xml");
- reload the document from the file :
- Code: Select all
data->loadFromFile( "c:\dump.xml");
How to do that ?
Best regards.





