[xml] xmlNsPtr creation

Date view Thread view Subject view Author view

From: Paolo Casarini (casarini@CS.UniBO.IT)
Date: Sat Feb 17 2001 - 06:19:20 EST


I've to implement a function that has, as parameters, an element node
(elem), a qualifiedName (name) of an attribute, a value (value) of an
attribute and a namespaceURI (uri).
This functions has to create an attribute node in the element node ELEM
with localName equal to the localName of NAME, value equal to VALUE and
with a namespace specified by the prefix of NAME and the URI.

Well, I can search if the such namespace is already present with
xmlSearchByHref, but if this namespace doesn't exists I have (I think) to
create it.
The function xmlNewNs wants an XML_ELEMENT_NODE as first parameter and not
an XML_ATTRIBUTE_NODE... How can resolv thi problem... What's the better
way to do this?

Thanx
Paolo

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Feb 17 2001 - 06:44:05 EST