zeux/pugixml

Convert nodes subtree to and from xml strings

xingwozhonghua126 opened this issue · 2 comments

Get the xml string method of the current node subtree.
Add xml string and convert it into xml root node tree.

std::stringstream ss;
node.print(ss);
std::string xmlstring = ss.str()

xml_document xmldoc;
xmldoc.load(xmlstring);
xml_node subnode = xmldoc.first_child();
node.append_copy(subnode);