I have the following xml :
<Ingredients attribute="true">
<Banana id="23" val="1" />
<Flour val="0.96" />
<Apple id="289055" val="0" />
</Result>
in an std::string xml
and I am trying for instance to get the double
value for the Flour
attribute. I tried :
pugi::xml_document doc;
if (!doc.load(xml.c_str()))
return false;
const pugi::xml_node floor = doc.child("Ingredients").child("Floor");
but floor
‘s data member root
has a NULL
value
at debug. How could I fetch the 0.96
?