Online tool for validating xml against xsd

I have this exact scenario running on my free copy of Microsoft Visual C 2010 Express.

I tend to use xsd from Microsoft to help generate the xsd from a . I also parse out sections of the xml using xmlstarlet.

Our development language is C if that makes any difference, although I don't think it should as we could generate the xml file and then do validation by calling a separate program in the test.

After some research, I think the best answer is Xerces, as it implements all of XSD, is cross-platform and widely used.

In addition you also get support for Schematron and Relax NG. Update 1/13/2012: The command line tool is free to use and uses Xerces as XML parser. But if you are missing an attribute in the XML you just get a message saying the element can not be validated.

I'm working on some very complicated XML with very complicated rules, and I'm new to this so tracking down which attribute is missing is taking a long time. It can be run from the command line like xmllint and it supports RELAX NG: https://java.net/ I found this online validator from 'corefiling' quite useful - After trying few tools to validate my xsd, this is the one which gave me detailed error info - so I was able to fix the error in schema.

Specifying a default XSD processor, or configuring a new, custom XSD processor to work Stylus Studio® is easy, just go to "Custom Validation Engines" in the Options panel which displays a list of available XSD Validators that are configured to work with Stylus Studio®.

By default, we've included several of the most popular XSD validators, including MSXML, Xerces, XSV, System.

Stylus Studio® allows you to easily validate XML documents against any data model defined using W3C XSD, using any major XSD Validator, including MSXML 3.0, MSXML 4.0, MSXML 6.0, Xerces-J, Xerces-C, Microsoft System.

I've created a small Java project on github to validate from the command line using the default JRE parser, which is normally Xerces. There is also a C version of Xerces available if you'd rather use that.

The Std In Parse utility can be used to call it from the command line.

At the office we are currently writing an application that will generate XML files against a schema that we were given. We would prefer free tools that are appropriate for commercial use although we won't be bundling the schema checker so it only needs to be usable by devs during development.

Are there tool or libraries that we can use for automated testing to check that the generated XML matches the schema?

Leave a Reply