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

XML File - Split

XML File Command Grooper.EDI

Splits an XML file.

Remarks

The Split command divides an XML file into multiple child documents based on an XPath selector.

How to Use

  1. Set the Item Selector to an XPath expression that matches the nodes you want to split into separate files.
  2. (Optional) Set the Sibling Selector to include additional sibling nodes with each split item.
  3. (Optional) Provide Namespace Mappings if your XML uses namespaces and your XPath needs to reference them.

For each node matched by the Item Selector, a new child document will be created containing that node (and optionally its siblings and ancestors).

Tips

  • Use the Item Selector to target the main repeating element (e.g. //Invoice to split on each invoice).
  • Use the Sibling Selector to include related nodes (e.g. comments or headers) with each split.
  • Define namespace mappings if your XML uses prefixes (e.g. ns=http://example.com/schema).

Example

  • Item Selector: //ns:record
  • Sibling Selector: preceding-sibling::ns:comment
  • Namespace Mappings: ns=http://www.example.com/schema

This configuration will create a new XML file for each <record> element, including any preceding <comment> siblings, using the specified namespace.

Properties

NameTypeDescription

See Also

Notification