If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Complicated DAD file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-11-03, 16:32
joharve2 joharve2 is offline
Registered User
 
Join Date: Dec 2003
Posts: 1
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?
Reply With Quote
  #2 (permalink)  
Old 12-11-03, 23:33
brat4 brat4 is offline
Registered User
 
Join Date: Apr 2003
Location: Singapore
Posts: 59
Re: Complicated DAD file

Quote:
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>
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On