Edit online

XML Instance Generator

Attention: This script is bundled with the all platforms distribution of Oxygen XML Editor Eclipse plugin. To run the script, you are required to purchase a special scripting commercial license.

You can generate multiple XML documents from an XML Schema from Oxygen XML Editor Eclipse plugin by using the Tools > Generate Sample XML Files main menu action. The settings dialog box has an Export settings option that can be used to export the settings to an XML configuration file. Once the settings are exported, you can use the xmlGenerator.sh script (found in the scripts subfolder inside Oxygen's installation directory) to generate multiple XML instance files from the command line.

Sample Command-Line Arguments for the Generate Sample XML Files Script

sh scripts/xmlGenerator.sh path/to/config/file [-verbose]

Extended Version of the Script and its Arguments

sh scripts/xmlGenerator.sh [[path_to_config_file] [-s XML_schema_path -r root [-n ns] [-o output_dir] 
[-f instance_name] [-i num_of_instances]] [-verbose]]
path_to_config_file
The path to the file that contains the configuration to be used.
-s XML_schema_path
The path to the XML schema to be used for generating the XML file(s). This argument can also be provided as a URL.
-n ns
The namespace used for the XML namespace declaration.
-r root

The root element for the generated file(s).

-o output_dir
The output directory to be used for storing the generated file(s).
-f instance_name
The pattern name to be used for the generated file(s). It is usually the name plus extension.
-i num_of_instances
The number of XML files to be generated.
-verbose
This argument can be specified to activate verbose logging.
Note: Any value specified by the -s, -n, -r, -o, -f, or -i arguments overrides the corresponding value from the configuration file, if that file is specified in the path_to_config_file argument.