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



On Wed, Dec 05, 2001 at 03:52:01PM -0000, Stephen Lord wrote:
Hi,

 I am sure I am missing something obvious here, but how would I go about
assembling an xml document which has references of this form:

<import location="http://localhost:80/addressbook_services/AddressBook.xsd";
namespace="http://www.addressbookservice.com/AddressBook-types"; />

(from a wsdl file)

I have read through the mailing list archive and found references to
Xinclude but am not sure if this is relevant. ref: xmlCopyNodeList ?

  Since you're not using the XInclude syntax the XInclude support will be
useless to you.

Is there an easy way to do this or do I have to do this step by step,
loading and inserting each referenced document and building a doc that way?

  Seems so.

If I build it step by step, how do I include the new document within the
structure of the parent? xmlCopyNodeList ?

  Yes or rather 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.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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