If the node being inserted into the tree doesn't define any namespace of its own, reuse the parents namespace for it. This is more consistent with libxml2 behaviour, as xmlNewChild() behaves like this, and less surprising as previously new nodes didn't have any associated namespace which was indistinguishable from having the same namespace as parent node in many cases (e.g. when converting the document to textual representation), but not always (e.g. matching these new nodes with XPath expressions involving namespaces didn't work).
Add an overload of node_to_string() just returning the string with the entire node contents instead of requiring to pass in a string to fill. The main benefit of this change is that the new function can be called from a debugger to view the node contents during a debugging session. Also mention the existence of this method in the "Tips and tricks" section of the manual.
Add a useful tree manipulation function allowing to move a node to another parent. This is simpler than copying it and also avoids problem with namespace definitions which are duplicated when the nodes are copied.
This allows to avoid installing Boost.Iostreams and Boost.Test needing just for the tests when building the library itself. Also document these requirements.
GCC supports deprecation messages since 4.5 and Visual C++ since 2005, so use it. Also fix incorrect Visual C++ checks so that it actually works now. Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43666 http://msdn.microsoft.com/en-us/library/044swk7y(v=vs.80).aspx
This check is contained in libxml2 too. Throw an exception with explanatory message.