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

2005-03-20 Thread Abraham Nelson
--- Abraham Nelson <[EMAIL PROTECTED]> wrote: > 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? Never mind. After using Google to search the list instead, I found ou

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

2005-03-20 Thread Abraham Nelson
--- Daniel Veillard <[EMAIL PROTECTED]> 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): xmlNsPtr NameSpac

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

2005-03-20 Thread Daniel Veillard
On Fri, Mar 18, 2005 at 04:40:51PM -0800, Abraham Nelson wrote: > I wonder if it's at all possible to add a namespace to > the document element in an existing tree. I've tried: > > xmlNewNs(xmlDocGetRootElement(xmlDoc),(xmlChar > *)"",NULL); > and also with: This adds a definition in the tree.

[xml] Adding a namespace to an existing tree?

2005-03-18 Thread Abraham Nelson
I wonder if it's at all possible to add a namespace to the document element in an existing tree. I've tried: xmlNewNs(xmlDocGetRootElement(xmlDoc),(xmlChar *)"",NULL); and also with: xmlReconciliateNs(xmlDoc,xmlDocGetRootElement(xmlDoc)); But it doesn't seem to get applied to the rest of the no