1.8

Table Of Contents
For an XML file
XML is a special file format because these file types can have a theoretically unlimited number
of structure types. The input data has two simple options that basically determine at which node
level a new record is created. You can either select an element type, to create a new delimiter
every time that element is encountered, or choose to use the root node. If there is only one top-
level element, there will only be one record before the Boundaries are set.
Note
The DataMapper only extracts elements for which at least one value is defined in the file.
See also: "XML File Input Data settings" on page206.
Record boundaries
Boundaries are the division between records: they define where one record ends and the next
record begins. Using boundaries, you can organize the data the way you want.
You could use the exact same data source with different boundaries in order to extract different
information. If, for instance, a PDF file contains multiple invoices, each invoice could be a
record, or all invoices for one customer could go into a single record.
Keep in mind that when the data is merged with a template, each record generates output
(print, email, web page) for a single recipient.
To set a boundary, a specific trigger must be defined.
The trigger can be a natural delimiter between blocks of data, such as a row in a CSV file or a
page in a PDF file.
It can also be something in the data that is either static (for example, the text "Page 1 of" in a
PDF file) or changing (a customer ID, a user name, etc).
To define a more complex trigger you could write a script (see "Setting boundaries using
JavaScript" on page257).
A new record cannot start in the middle of a data field, so if the trigger is something in the data,
the boundary will be set on the nearest preceding natural delimiter. If for instance in a PDF file
the text "Page 1 of" is used as the trigger, the new record starts at the page break before that
text.
For an explanation of all Boundaries options per file type, see "Boundaries" on page207.
Page 117