Terms used in this section
Document is an XML file and comprises Records.
Records are of three types:
Master record (one per document) defines a document in terms of data that appears once only such as document number, other party information, activity dates and totals.
Detail records (which you name, example "Product") define other information in the document.
Unwanted records are defined with Print Line files to recognize unwanted information (such as page 2 and subsequent page headings and other "between page" information such as continued lines). These records are output to the XML file (and are subsequently deleted from Layout by the user).
The recommendation is to use "UNW" as the profix for unwanted (UNW-Header for example).
Master or Detail records may be absent; an example Master-only document would be a registration, example Detail-only document would be labels.Records are one or more Areas
Areas are data from input. For the PO example, the areas of the Master are the Master itself - taken from the heading on Page 1, the Trailer information from the last page and the optional Header Comments, taken (if they are there) from the lines immediately following the page 1 header and prior to the details.
Areas comprise Fields.
Fields are discrete data, but may concatenate different lines as a single field. The example shows Header Comments and Detail Comments, each being concatenated into single fields.
Rules are fields with RegEx (Regular Expressions) applied to recognize areas. RegEx are selected from a list comprising of Empty, Exact Match, Contains, Starts with etc., as well as the negatives of these. Users can add to the supplied list.