Apart from the necessary #includes, and missing using namespace rapidxml;
your code compiles and runs fine for me.
xmlstring contains this:
<?xml version="1.0" encoding="utf-8"?>
<root ="">
<old/>
<boy/>
</root>
Because old
and boy
have no content, they use xml empty element tags, <tagname/>
rather than start and end pairs like <tagname></tagname>