Downloads / XML Validator Tool

DataShop can import XML files of transaction data which conform to the logging standard. While the import process can only be done by DataShop developers, you should first run this tool against your XML files to verify that they are valid XML and comform to the DTD.This tool will validate all files within the provided directory against the schema specified within each file. It will also perform custom validation pertinent to DataShop processing expectations.

DataShop can process multiple XML files for inclusion in a single dataset. When receiving XML data, we prefer many smaller files as opposed to a few large files.

Download the XML Validator Tool

Note: Java must be installed and available from the command line. To check this, open a command prompt (Windows: Start > Run > cmd or Mac: Applications > Utilities > Terminal) and type: java -version If you see something like the following, continue to with step 1 below. If you don't, make sure you have Java installed (see Do I have Java? on Sun's website).

java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

To validate your XML files:

  1. Download the ZIP file above and extract its contents to your hard disk.
  2. Open a command prompt and navigate to the XML Validator tool directory, which should contain both "dist" and "extlib" directories.
  3. Enter the following on a single line:

    On Windows:

    java -Xmx512m -classpath "dist\datashop-xv.jar;extlib\jdom.jar; extlib\jdom-contrib.jar;extlib\log4j-1.2.13.jar;extlib\xercesImpl.jar;extlib\commons-lang-2.2.jar;." edu.cmu.pslc.datashop.xml.validator.XMLValidator -inputDir path\to\files_to_validate

    On Mac:

    java -Xmx512m -classpath "dist/datashop-xv.jar:extlib/jdom.jar: extlib/jdom-contrib.jar:extlib/log4j-1.2.13.jar:extlib/xercesImpl.jar:extlib\commons-lang-2.2.jar:." edu.cmu.pslc.datashop.xml.validator.XMLValidator -inputDir path/to/files_to_validate

    where path/to/files_to_validate is the path to the directory of XML files to validate.

    The XML Validator will run and provide information about the validity of the XML files. Results from the verification are printed to the console and to an output text file called datashop-verify.log.

For more information about what constitutes 'validity', see the guide to the tutor message format.

Command-Line Options

-i, -inputDir The path of the input directory (required).
-v, -verbose Run the tool in verbose mode (additional logging).
-h, -help Display help and exit.
-version Display version information and exit.

Version Information

To get version information for the XML Validator Tool, run the following command on a single line:

On Windows:

java -classpath "dist\datashop-xv.jar;extlib\log4j-1.2.13.jar;."
edu.cmu.pslc.datashop.util.VersionInformation

On Mac:

java -classpath "dist/datashop-xv.jar:extlib/log4j-1.2.13.jar:."
edu.cmu.pslc.datashop.util.VersionInformation

Back to top