I parse a document and want to retrieve part of the XML tree as string. The document (example):
<?xml version="1.0"?>
<MyConfig>
<MyData>
<Foo bar="baz>42</Foo>
</MyData>
<OtherData>Something</OtherData>
</MyConfig>
The code:
pugi::xml_document doc;
doc.load_file(documentFileName);
pugi::xml_node root = doc.child("MyConfig");
// parse custom data
_customData = root.child("MyData"). <-- HOW TO GET INNER XML?
Expected contents of custom data (if formatting is lost, I don't mind):
"<Foo bar="baz>42</Foo>"
How to do this?