From: Daniel Veillard (Daniel.Veillard@imag.fr)
Date: Sun Feb 18 2001 - 05:00:16 EST
On Sun, Feb 18, 2001 at 10:29:57AM +0100, Paolo Casarini wrote:
>
>
>
> On Sat, 17 Feb 2001, Paolo Casarini wrote:
>
> > The function xmlNewNs wants an XML_ELEMENT_NODE as first parameter and not
> > an XML_ATTRIBUTE_NODE... How can resolve this problem... What's the
> > better way to do this?
> I think, I have to call xmlNewNs with NULL as a node and then call
> xmlSetNsProp.
an xmlNsPtr is a namespace *declaration*. A declaration can be done
only on a node. xmlNewNs with null is likely to fail. If you want to create
and attribute its namespace must be carried by a node. This may sound
a bit troublesome w.r.t. DOM but in libxml that's the way it's done.
Daniel
-- Daniel Veillard | Red Hat Network http://redhat.com/products/network/ veillard@redhat.com | libxml Gnome XML toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ ---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Sun Feb 18 2001 - 06:44:01 EST