Code: Select all
SAXException: Property 'http://java.sun.com/xml/jaxp/properties/schemaLanguage' must be set before setting property 'http://java.sun
.com/xml/jaxp/properties/schemaSource'.
Code: Select all
private static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
/** * Schema source property */
private static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
/** * XML schema language */
private static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
.
.
.
SAXParser saxParser = factory.newSAXParser();
saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
saxParser.setProperty(JAXP_SCHEMA_SOURCE, new File(schemaSource));
Thanks,
Steve