Split a complex XML structure
  • Split the source XML at each ORDER and NEW_ORDER element, which are all at depth = 3.
  • Include in each output file the parent elements of the first element that is split.
  • Also include the ORDER_HEADER, which has an element at depth = 3 that should not be written to a separate split file since it is not an order.
  • Files tab: select the XML file, output folder and output file name for the split files.
  • Methods tab: select method A, set the frequency to 1, depth = 3 and leave the Element Name blank because the order elements do not have the same name.
  • Options tab: check the Preserve Structure option.
  • Options tab: set the Threshold Element to NEW_ORDER. This prevents ORDER_RANGE from being written to a separate split file, but will be included in the header.
  • Split tab: run the split, or use the Preview mode to confirm the ouput files are what you expect.
Methods Tab

Options Tab


The first two split files appear below. The Preserve Structure option automatically included all parent nodes of the Threshold Element and End Elements to ensure proper element nesting.