Showing posts with label xsd. Show all posts
Showing posts with label xsd. Show all posts

Tuesday, November 27, 2012

XML validation against schema

We could use simple online tools to validate xml files against a single schema. But if we have more than one schema files, which are sub schemas of the base schema,  needed to validate a single xml file, we could use some other  tools which are availble freely.
I used libxml which works better. But for windows-64 bit platform, binary distribution is not available. We need to compile the source files. For linux, compilation would be easy.

Run xmllint from the "bin" folder

# xmllint --noout --schema <BASE_XSD_FILE>  <XML_FILE_TO_BE_VALIDATED>

If there are any errors it will be shown in the command prompt.