Re: [xml] Adding a namespace to an existing tree?

--- Daniel Veillard <veillard redhat com> wrote:
  node and attributes structure have an ns field
indicating to which
manespace they pertain or NULL if they are not
related to any namespace.

I had seen a reference to those in the archive, so I
tried this (which works):


void setElementNS(xmlNode * a_node,xmlNsPtr nameSpace)
    xmlNode *cur_node = NULL;
    for (cur_node = a_node; cur_node; cur_node =
cur_node->next) {
        if (cur_node->type == XML_ELEMENT_NODE) {

However now I wonder if the namespace structure I
created will automatically be freed when I call
xmlFreeDoc(xmlDoc) later, or if I have to release it
myself with xmlFreeNS?

Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site! 

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