Firstly I would like to say that I have been using an XML parser written by Frank Vanden Berghen and recently trying to migrate to Pugixml. I am finding the transition bit diffi
Please refer to the following section of the manual https://github.com/zeux/pugixml/blob/master/docs/manual.html#manual.modify.add and to the following sample code https://github.com/zeux/pugixml/blob/master/docs/samples/modify_add.cpp
Home page of pugixml gives sample code for building XML tree from scratch.
Summary: Use default constructor for pugi::xml_document doc
, then append_child
for the root node. Generally, a node is first inserted. The insertion call's return value then serves as a handle for filling the XML node.
Constructing xml tree