Sample XML file widgets.xml containing 50 ORDER elements
Example 6: Split every 10 elements at depth 2 and preserve XML hierarchy.
  • Uses the Preserve Structure checkbox.
  • Automatically ensures structure of each split file matches the original XML document.
Five split files are created, each with ten ORDER elements. Each node that occurs in the source XML prior to the first split element is written to the start of every split file. If any of these nodes are open elements, their corresponding end tags are written to the end of each split file such that all elements are closed and properly nested.

Note that no other optional items are specified. The root element is inserted automatically, along with XmlDeclaration and DocumentType nodes if they occur. Also note that all node types are copied.

Wizard Options For this example

First two split files created are below:

Split file 1.

Split file 2.