[xml] root node with namespace



How is a root node created with a namespace? It seem that to make the root node I'd need to have a namespace to use with xmlNewNode() and to make a namespace I would need to call xmlNewNs() which requires a node as indicated in the following two functions.

xmlNodePtr xmlNewNode(xmlNsPtr ns, const xmlChar *name)

xmlNsPtr xmlNewNs(xmlNodePtr node, const xmlChar *href, const xmlChar *prefix)

Which call comes first and how do you create your first node with a namespace?

thanks,
Dave



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