[xml] Clearing nsDef after xmlDocCopyNode



I'm using xmlDocCopyNode to "clone" a node from one document into another

In the source node
* "ns" value is set to the namespace
* "nsDef" is NULL

After xmlDocCopyNode:

In the destination node (newnode)
* "ns" value is set to the namespace
* "nsDef" is set to the same as "ns"

The namespace is already set at the document root. So I just do

newnode->nsDef = NULL;

Is this valid? Seems hacky but I couldn't see an API method to clear the namespace from the node.

Thanks

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]