Sybase 2 Barcode Reader User Manual


 
CHAPTER 14 Exporting and Importing XML Data
DataWindow Designer User’s Guide 401
For example, consider a group DataWindow object that includes the columns
sales_order_id and sales_order_order_date. The following screenshot shows
the template for this DataWindow object:
The root element in the Header section of the template, Orders, has a child
element, Order. Order has an id attribute whose value is a control reference to
the column
sales_order_id. Order also has a child element, OrderDate, that
contains a column reference to the
sales_order_order_date column. These
elements make up the header section that will be iterated for each group.
The Detail Start element, Item, has an id attribute whose value is a control
reference to the column
sales_order_items_line_id. It also has three child
elements that contain column references to the line items for product ID,
quantity, and ship date.
When the DataWindow is exported with the Iterate Header for Groups property
on, the order ID and date iterate for each group. The following XML output
shows the first three iterations of the group header:
<?xml version="1.0" encoding="UTF-16LE"
standalone="no"?>
<Orders>
<Order id="2001">
<OrderDate>2002-03-14</OrderDate>
<Item id="1">
<Product>300</Product>
<Quantity>12</Quantity>
<ShipDate>2005-09-15</ShipDate>
</Item>
<Item id="2">
<Product>301</Product>
<Quantity>12</Quantity>
<ShipDate>2005-09-14</ShipDate>
</Item>
<Item id="3">
<Product>302</Product>
<Quantity>12</Quantity>