Sybase 2 Barcode Reader User Manual


 
CHAPTER 14 Exporting and Importing XML Data
DataWindow Designer User’s Guide 387
Saving templates
To save a new template, select Save from the pop-up menu in the
Export/Import Template view, and give the template a name and optionally a
comment that identifies its use.
The template is stored inside the DataWindow object in the PBL. After saving
a template with a DataWindow object, you can see its definition in the Source
editor for the DataWindow object. For example, this is part of the source for a
DataWindow that has two templates. The templates have required elements
only:
export.xml(usetemplate="t_address"
template=(comment="Employee Phone Book"
name="t_phone" xml="<d_emplist><d_emplist_row
__pbband=~"detail~"/></d_emplist>")
template=(comment="Employee Address Book"
name="t_address" xml="<d_emplist><d_emplist_row
__pbband=~"detail~"/></d_emplist>"))
Header and Detail sections
An XML template has a Header section and a Detail section, separated
graphically by a line across the tree view.
The items in the Header section are generated only once when the DataWindow
is exported to XML, unless the DataWindow is a group DataWindow. For
group DataWindow objects, you can choose to generate the contents of the
header section iteratively for each group. For more information, see
“Generating group headers” on page 400.