Sample XML file orders.xml containing 50 ORDER elements
Example 2: Split every 20 elements at depth 1.
  • Insert root element of the source XML document in each split file.
  • Write each split file in utf-16 (unicode) encoding.
  • Write the byte order mark in each split file.
  • Insert an include file in each split file.
  • Insert an append file in each split file.
The include file is inserted in each split file. The one in this example contains an XmlDeclaration, which must be the first node in an XML document, so the include file is inserted at the beginning of each split file. If the include file does not contain an XmlDeclaration, it would be inserted immediately after the root element start tag. The append file is always written to the end of each split file, after the root end tag, so it should contain only XML node types allowed there, such as comments, or the split file will not be well-formed XML. However, the include and append files are not checked for XML syntax because some users do not want the split files to be XML files.
Wizard Options For this example

Include file.

Append file.

First two split files created are below:

Split file 1.

Split file 2.