philipp's weblog header image

Using the the Sun/Oracle Multi-Schema XML Validator (MSV)

April 18th, 2012 · 2 Comments · English, other stuff

I regularly work with more or less complex XML Schemas, and debugging those requires some tools with command lines I usually forget after a while. So I decided to write down some of my frequently used command lines for MSV, the Sun/Oracle Multi-Schema XML Validator. Maybe you find some of those helpful as well (since the MSV documentation is not exactly perfect).

Note: While I only use MSV for XML Schema validation, it can be used for RelaxNG and other schema languages as well.


That’s the easy part: download a binary build from and unzip it (you only need the

Validate a XML document

$> cd msv-20090415
$> java -jar msv.jar schema.xsd document.xml
start parsing a grammar.
validating document.xml
the document is valid.

Dump the post-schema-validation infoset (PSVI)

Often it is useful to see which type the XML Schema parser attached to a node in a document. To do this, get the post-schema-validation infoset (PSVI) from the schema validator. With MSV comes a sample application that can be used for this purpose.
$> cd msv-20090415/examples
$> java -cp .:../msv.jar psvi.PSVIDump schema.xsd document.xml


2 responses so far ↓

  • 1 Vivek Kumar // Mar 26, 2013 at 08:46

    Thanks! This helped me a lot.

  • 2 Scott Rifenbark // Dec 17, 2014 at 15:50


    This particular blog entry really helped me get going with MSV. I spent quite a bit of unsuccessful time trying to locate, install, and run MSV. Your short, accurate article on how to do this did the trick… Thanks!


Leave a Comment