Hi,
I want to validate an XML file against RELAXNG schema provided. Searching on the net gave me hints to create a Schema instance using SchemaFactory by providing the appropriate Schema Language. So as per my requirement I used:
*SchemaFactory.newInstance(XMLConstants.RELAXNG_NS_URI);*
But the following exception was thrown at run:
Exception in thread "main" java.lang.IllegalArgumentException: No SchemaFactory that implements the schema language specified by: http://relaxng.org/ns/structure/1.0 could be loaded
at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:207)
I am using Java6 and observed that only 'W3C_XML_SCHEMA_NS_URI' works. Rest all the schema URIs throws the similar exception.
I am fairly new to using the XML validation APIs. Can someone please provide me the appropriate usage in case I am not doing it correctly?
Thanks & Regards,
Keya