OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Question on XSD validator

[ Lists Home | Date Index | Thread Index ]

>   Can somebody please tell me how to validate an XML document 
> with a given XSD ?
> Is the XSD validator part of an XML library [like Xerces, 
> libxml2 etc] itself or there exist some separate library to 
> validate an XML document using XSD ?

There are a number of tools including Xerces, MSXML, XSV.

The way you do validation depends on the tool that you are using. If you
install the schema-aware version of Saxon, you can use the command line:

java com.saxonica.Validate source.xml schema.xsd

I find that the easiest way to do ad-hoc validation (i.e., not integrated
into an application) is to use a tool such as Stylus Studio. One of the nice
things is that Stylus allows you to validate using a range of different
processors - if your document is invalid, it can be helpful to get the error
messages from more than one processor. By contrast, XML Spy uses its own
schema processor, which is not always 100% conformant with the spec.

Michael Kay
http://www.saxonica.com/






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS