Get a detailed error report on XML validation
Until today the free XML Validator Buddy shell tool, which uses the Xerces parser internally, only reported if the XML instance is valid or not. This has changed with the latest release 3.2.2 of the XML command line tool. Now it is also possible to get a detailed error report with the new -verbose option on running the XML validator on one or more documents.
Just add the -verbose option to the command line to turn it on:
valbuddy.exe -v -verbose ctI031.xml
XML ValidatorBuddy command-line Tool By xml-buddy.com, Copyright 2012 C:UsersDocumentsxmlxmlschema2006-11-06msDatacomplexTypectI031.xml: invalid Line: 3, Col: 29 : complex type ',fooType' does not permit substitution Line: 6, Col: 12 : no declaration found for element 'fooEle3' Line: 7, Col: 12 : element 'fooEle3' is not allowed for content model '(fooEle1,fooEle2)'
New external schema option
Not all XML instances have a schema already assigned. To successfully run the XML validator for those documents one needs to specify an external schema. To accomplish this the latest release of the XML Validator Buddy command line tool also provides a new -s option. If the -s option has been added to the command line, the first specified path is taken as the schema file for all following XML instances.
valbuddy.exe -v -verbose -s ctI030.xsd ctI031.xml
XML ValidatorBuddy command-line Tool By xml-buddy.com, Copyright 2012 C:\Users\Documents\xml\xmlschema2006-11-06\msData\complexTypectI031.xml: invalid Line: 3, Col: 29 : complex type ',fooType' does not permit substitution
All sample files are taken from the official W3C Schema test suite and can be downloaded here: http://www.w3.org/XML/2004/xml-schema-test-suite/#releases