[xml] xmlNewNs question



I am defining an XML grammar for a project of mine, and I'd like to put it
into a namespace so as to avoid collisions.

As I read it, xmlNewNs needs an xmlNodePtr to create the namespace within.
The online information leaves me a bit fuzzy on what that node should be -
should that be the root node of the document, the document node itself, or
the element node?

If I create a xmlNsPtr for a node, and then the node is destroyed, is the
xmlNsPtr still valid and available for other nodes? If is is invalid, does
it need to be freed?





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