Specifications

Importing XML
392 InfoMaker
For complex, nested XML with row data in an iterative structure, you may need
to design a structure that uses several linked report definitions to import the
data. Each report must define the structure of a block of iterative data with
respect to the root element. Importing the data into the reports would require
multiple import passes using different import templates.
Defining import
templates
The XML import template can be defined in the Export/Import Template view
for XML. If you are defining a template for use only as an import template, do
not include InfoMaker expressions, text, comments, and processing
instructions. These items are ignored when data is imported.
Only mappings from report columns to XML elements and attributes that
follow the Starts Detail marker in the template are used for import. Element and
attribute contents in the header section are also ignored. If the Starts Detail
marker does not exist, all element and attribute to column mappings within the
template are used for import. For more information about the Starts Detail
marker, see “The Detail Start element” on page 372.
Matching template
structure to XML
An XML import template must map the XML element and attribute names in
the XML document to report column names, and it must reflect the nesting of
elements and attributes in the XML.
The order of elements and attributes with column reference content in the
template does not have to match the order of columns within the report,
because import values are located by name match and nesting depth within the
XML. However, the order of elements and attributes in the template must
match the order in which elements and attributes occur in the XML. Each
element or attribute that has column reference content in the template must
occur in each row in the XML document or string. The required elements and
attributes in the XML can be empty.
If an element or attribute does not occur in the XML document, the report
import column remains empty.
The data for the report is held in the columns of the data table. Some data
columns, such as those used for computed fields, may not have an associated
control. To import data into a column that has no control reference, add a child
InfoMaker expression that contains the column name.
Remove tab characters
When you select a column name in the InfoMaker expression dialog box, tab
characters are added before and after the name. You should remove these
characters before saving the expression.