Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

XML File - Load Data

XML File Command Grooper.EDI

Loads data from an XML file into a Data Model.

Remarks

The Load Data command imports data from an XML file and populates the fields and sections of the associated Data Model.

How it Works

  1. The command reads the XML file attached to the current Batch Folder.
  2. For each field and section in the Data Model, it uses the field or section's Import Source property (an XPath expression) to locate the corresponding value or node in the XML.
  3. If a match is found, the value is imported; otherwise, the field's default value is assigned.
  4. Section collections (repeating groups) are populated by matching multiple nodes.
  5. Empty or missing sections are removed if their "Miss Disposition" is set to "No Instance".

Tips

  • Set the Import Source property on each field or section to the XPath that matches the desired XML node or attribute.
  • The Import Source will automatically be set on Data Models created using the XML Schema Importer.
  • Use namespace prefixes in your XPath if your XML uses namespaces.
  • Fields without an Import Source will be set to their default value.
  • Section collections will be populated with one instance per matching XML node.

Example

Suppose your Data Model has a field "InvoiceNumber" with Import Source Invoice/@number, and a section "LineItems" with Import Source Invoice/LineItem.

  • The command will set "InvoiceNumber" to the value of the number attribute on the <Invoice> element.
  • It will create one "LineItems" section for each <LineItem> child of <Invoice>, mapping child fields using their own Import Source.

See Also

Notification