I am trying to get pugiXML to work and have created a minimalistic example.
#include <pugixml.hpp>
int main(int argc, char** argv)
{
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file("C:\temp\test.xml");
if (!result)
return -1;
return 0;
}
The content of test.xml
is as follows.
<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
When running the code, and looking into doc
, the buffer only contains the following:
<?xml version="1.0" encoding="UTF-8"?>n<note
No matter what I put into the XML file it stops reading after the name of the first opening tag, in this case note
.
Am I missunderstanding something here?