I get a child node this way:
pugi::xml_node child = root.child("aaa")
I would like to check if that child node exists. Should I just call child.empty() ?
child.empty()
The xml_node class has a logical bool operator overload that allows you to check that it exists by simply calling
xml_node
if (child) { ... }
and similarly an operator! for checking if it doesn't exist with
operator!
if (!child) { ... }
The
xml_nodeclass has a logical bool operator overload that allows you to check that it exists by simply callingand similarly an
operator!for checking if it doesn't exist with