dimanche 19 avril 2015

Print out XML nodes using pugixml c++

I'm using pugixml to print out a load of XML nodes. My output is currently like this:



<id>1</id>
<description>Testing</description>


However I want my std::cout output to be like this for each item:



id = 1
description = Test


My C++ code to dump out the node is currently this: eb.second.print(std::cout);


How do I grab the content of the node and print it?


The closest I could find on the subject was this:


rootNode.child("description").as_string()


http://ift.tt/1Q57zzy


Aucun commentaire:

Enregistrer un commentaire