On Fri, Feb 09, 2007 at 07:13:26PM -0800, Yong Chen (yongche) wrote:
> 
> Hi,
> 
> I've a question regarding copying one node's properties and namespaces.
> 
> First, I want to copy all properties of node A to B, is it correct to do
> following?
> 
>                 B->properties=xmlCopyPropList(B, A->properties)
> 
> 
> Then, I also know that node A has several namespaces defined (such as
> xmlns:first="www.first.com" xmlns:second="www.second.com"), I want to
> copy all of them to node B, should I do both of following?
> 
>                B->ns=xmlCopyNamespaceList(A->ns);
> And
>                B->nsDef=xmlCopyNamespaceList(A->nsDef);
> 

  yes, in libxml2 they are separate kind of objects,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to