[xml] Copy properties and namespaces




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);





Thanks in advance for your help,

Yong Chen



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