Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    1

    Unanswered: Complicated DAD file

    Does anyone have an advanced example of a XML Extender DAD file? We are trying to export some relational information that comes from about 10 tables. We have not been able to create a DAD file that will export the data succesfully(For more then one table--joined). Most of the examples on the IBM site appear to be in version 8, and I am wondering if it is even possible to do complex XML Extender stuff with version 7?


    So it is either my inexperience with DB2, or DB2 7.0 inexperience with XML...anyone with any experience or insight?

  2. #2
    Join Date
    Apr 2003
    Location
    Singapore
    Posts
    59

    Re: Complicated DAD file

    Originally posted by joharve2
    Does anyone have an advanced example of a XML Extender DAD file? We are trying to export some relational information that comes from about 10 tables. We have not been able to create a DAD file that will export the data succesfully(For more then one table--joined). Most of the examples on the IBM site appear to be in version 8, and I am wondering if it is even possible to do complex XML Extender stuff with version 7?


    So it is either my inexperience with DB2, or DB2 7.0 inexperience with XML...anyone with any experience or insight?
    I have been doing a bit of research on XML Extender and am myself pretty new to this stuff. Below is an example..hope it helps.

    <?xml version="1.0"?>
    <!DOCTYPE DAD SYSTEM "c:\dxx\dtd\dad.dtd">
    <DAD>
    <validation>NO</validation>
    <Xcollection>
    <SQL_stmt>select o.order_key, customer_name, customer_email, p.part_key, color, qty, price, tax, ship_id, date, mode from order_tab o, part_tab p, table(select substr(char(timestamp(generate_unique())),16) as ship_id, date, mode, part_key from ship_tab) s where o.order_key = 1 and p.price > 20000 and p.order_key = o.order_key and s.part_key = p.part_key ORDER BY order_key, part_key, ship_id</SQL_stmt>
    <prolog>?xml version="1.0"?</prolog>
    <doctype>!DOCTYPE Order SYSTEM "c:\dxx\samples\dtd\getstart.dtd"</doctype>
    <root_node>
    <element_node name="Order">
    <attribute_node name="key">
    <column name="order_key"/>
    </attribute_node>
    <element_node name="Customer">
    <element_node name="Name">
    <text_node><column name="customer_name"/></text_node>
    </element_node>
    <element_node name="Email">
    <text_node><column name="customer_email"/></text_node>
    </element_node>
    </element_node>
    <element_node name="Part">
    <attribute_node name="color">
    <column name="color"/>
    </attribute_node>
    <element_node name="key">
    <text_node><column name="part_key"/></text_node>
    </element_node>
    <element_node name="Quantity">
    <text_node><column name="qty"/></text_node>
    </element_node>
    <element_node name="ExtendedPrice">
    <text_node><column name="price"/></text_node>
    </element_node>
    <element_node name="Tax">
    <text_node><column name="tax"/></text_node>
    </element_node>
    <element_node name="Shipment" multi_occurrence="YES">
    <element_node name="ShipDate">
    <text_node><column name="date"/></text_node>
    </element_node>
    <element_node name="ShipMode">
    <text_node><column name="mode"/></text_node>
    </element_node>
    </element_node>
    </element_node>
    </element_node>
    </root_node>
    </Xcollection>
    </DAD>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •