Hi there, I am having the following issue when trying to validate an XML file using an XSD schema. This is the error message: "schema_reference.4: Failed to read schema document 'C:Test Demo\4.2 testing\tmp\xsd-cache\cached_schema_64465.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>."
I am creating the SAX parser as follows: SAXParserFactory factory = javax.xml.parsers.SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setValidating(true); SAXParser parser = factory.newSAXParser(); parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", resolveSchemaSource(schemaSource)); The resolveSchemaSource(String) method extracts the schema from the classpath, copies it to a temporary location on disk and returns the canonical path of the schema file. Are there any other invalid characters that could end up in the path that should be taken into account? Thanks Jo --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]