1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Mistake in string parse; interface is ambiguous and must fix. Is char * a file, or a XML buffer ?

This commit is contained in:
paboyle 2017-10-26 23:30:37 +01:00
parent 0f3e9ae57d
commit 00ebc150ad

View File

@ -68,10 +68,10 @@ std::string XmlWriter::XmlString(void)
XmlReader::XmlReader(const char *xmlstring,string toplev) : fileName_("")
{
pugi::xml_parse_result result;
result = doc_.load_file(xmlstring);
result = doc_.load_string(xmlstring);
if ( !result ) {
cerr << "XML error description: char * " << result.description() << " "<< xmlstring << "\n";
cerr << "XML error offset : char * " << result.offset << " "<<xmlstring <<"\n";
cerr << "XML error description (from char *): " << result.description() << "\nXML\n"<< xmlstring << "\n";
cerr << "XML error offset (from char *) " << result.offset << "\nXML\n"<< xmlstring <<"\n";
abort();
}
if ( toplev == std::string("") ) {