XMLDocument doc;
doc.Parse(xml);
XMLElement* titleElement = doc.FirstChildElement("PLAY")->FirstChildElement("TITLE");
const char* title = titleElement->GetText();
Serial.printf("Name of play (1): %s\n", title);
`
The file is exported from a navigator so I have no control over that.
The line in the XML file that causes the crash is the <gpx ...> line (I added it to the sample xml to test)
It crashes when calling XMLElement* titleElement = doc.FirstChildElement("PLAY")->FirstChildElement("TITLE");
I have an XML file that has a header that is causing the XML parser to crash.
`
static const char* xml = "<?xml version=\"1.0\"?>" "<gpx xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.topografix.com/GPX/1/1\" version=\"1.1\" creator=\"PocketFMS EasyVFR\">" ""
"A Midsummer Night's Dream "
" ";
`
The file is exported from a navigator so I have no control over that. The line in the XML file that causes the crash is the <gpx ...> line (I added it to the sample xml to test) It crashes when calling XMLElement* titleElement = doc.FirstChildElement("PLAY")->FirstChildElement("TITLE");