[xsde-users] Load multiple xml files and combine the data

Boris Kolpackov boris at codesynthesis.com
Fri May 28 06:55:25 EDT 2010


Hi Jaws,

Jaws <jaws75 at tiscali.it> writes:

>    Let's suppose to extend the library example adding in the catalog other
>    elements like DVD and CD. So we will change the schema adding these new
>    classes of records.
>    Let's suppose that you need to add to the original database only the new
>    DVDs. You'll have another XML files, we can call the Xml_update, that
>    report only the new DVD records.
> 
>    How can we manage ths situation? Are we obliged to have the Xml_update
>    file with the same structure to the original databse but with the Book 
>    and CD section empty? Or is it possible to read the file that contains
>    only the DVD part?

It all depends on how this is represent in the schema. Let's say we have 
the following extended catalog type:

  <complexType name="catalog">
    <sequence>
      <element name="book" type="lib:book" minOccurs="0" maxOccurs="unbounded"/>
      <element name="cd" type="lib:cd" minOccurs="0" maxOccurs="unbounded"/>
      <element name="dvd" type="lib:dvd" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
  </complexType> 

Then you can have a document that only contains DVDs and you can iterate
over the dvd sequence and copy/move its entries to another document in
the same way as I described in my previous email.


>    Hope I was clear in the explanation.

It is hard to understand what you trying to achieve without a concrete
schema fragment. Can you modify the 'library' example to demonstrate
your use-case?

Boris



More information about the xsde-users mailing list