Re: [xml] Assembling xml documents from multiple wsdl files

On Wed, Dec 05, 2001 at 05:14:29PM -0000, Stephen Lord wrote:
| ... xmlDocCopyNode() so that the proper doc information get
| propagated in the new nodes.
|   If you really know what you are doing and that there isn't troubles with
| namespaces etc... doing an xmlUnlinkNode() and simply an xmlAddChild()
| would avoid the cost of the copy. But if you're unsure, simply use
| xmlDocCopyNode() for each of the nodes in the included document and
| xmlAddChild() them to their final destination.

I assume that I just have add the top-level nodes from the source doc to the
target doc?

  Depends on the semantic of their include mechanism. The safest 
is to get the DocumentRoot of the source and copy it with xmlDocCopyNode
to the target doc and then append it to the inclusion point.

  Check their documentation, this can get quite subtle to do right
(and the reason why XInclude is being standardized).


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine

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