Sample XML file orders.xml containing 50 ORDER elements
Example 1: Split every 10 elements at depth 1.
  • Insert root element of the source XML document in every split file.
Five split files are created, each with ten ORDER elements. For each split file, the program writes the specified ORDERS root element and then writes each element with a depth of 1, including child nodes. When 10 such elements have been written, a new split file is created and these steps are repeated until the end of the source XML document has been reached. Child nodes are not included in the count. Note that in the sample file all elements with a depth of 1 are ORDER elements. If that were not the case, the Wizard provides the option "and name=" which could be used for specifying "ORDER" with the result that only ORDER elements at depth 2 would be written to the split files.

Note that while the root element is optional, split files will not be well-formed XML without a root element. Clicking the Insert XML root button in the Wizard automatically inserts the root element, including all of its attributes, into the textbox, which may be edited. Edits are checked for correct XML syntax.

Wizard Options For this example

First two split files created are below:

Split file 1.

Split file 2.