I've the following XML:
<?xml version="1.0" encoding="utf-8"?>
<jack>
<client name="Music Player Daemon">
<port name="left">
<connection port="jamin:in_L" />
</port>
<port name="right">
<connection port="jamin:in_R" />
</port>
</client>
</jack>
I'm trying to parse it using PugiXML but after load my document is empty, the result description say no error:
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load("/location/filename.xml");
std::cout << "Load result: " << result.description() << std::endl;
but it's a empty doc:
std::size_t numitens = std::distance(doc.begin(), doc.end());
std::cout << numitens << std::endl;
Output:
Load result: No error
0
I think that XML isn't problem, right ?
The XML is generated by other app, so I can't change, if have a problem in XML I'll need change XML parser ? TinyXML or libxml++ ?