Search code examples
c++referencexml-parsingpugixml

Set a pugixml node to null?


In pugixml the type pugi::xmlnode is an object for referencing parts of an XML tree. Being vaguely pointer-like, these objects can be null. The pugi library often returns null nodes, but how can I create one myself?

[update] Perhaps "creating" a null node is not what I want. I actually want to take an existing node object and make it nul.


Solution

  • Did you try:

    pugi:xml_node node(NULL);