Example 7: Create split files of a specified size.
  • Creates split files that are as close to the specified size as possible and are well-formed XML.
  • Assumes XML file whose size is a bit larger than 109 MB to be split into 3 files.

After entering "3" in the input for the number of files, clicking on the input for the number of bytes causes the program to automatically fill it in. The exact number of files created and their sizes depends on where the program can split and have all elements properly closed and nested as required for XML files. After the specified number of bytes have been read and written, the file is split at the next node that would result in a well-formed XML. In most XML files, that would be where an element at depth one occurs. However, this example specifies the file should be split at depth "2" at an element named "book" because all book elements are nested under element "newbooks" which is nested under the root element "bookstore" If the element name is left blank the split will occur at the next element at the specified depth, which is useful when element names are inconsistent in the file.

Wizard Method
example8splitsize
Wizard Options

The only option specified is Preserve Structure which will ensure the elements are properly nested in each split file.

example8options