S
slc
Hi,
I wan to validate a xml file with a xsd file.
So there istructions:
SchemaFactory sf =
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = sf.newSchema(new File(".../file.xsd"));
But when i build new instance of schema (sf.newSchema(...))
java give this error:
org.xml.sax.SAXParseException: schema_reference.4: Failed to read
schema document XXXX', 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 have tried with several xsd files that seem are ok.
The file path is right.
What also con be?
Thanks,
slc.
I wan to validate a xml file with a xsd file.
So there istructions:
SchemaFactory sf =
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = sf.newSchema(new File(".../file.xsd"));
But when i build new instance of schema (sf.newSchema(...))
java give this error:
org.xml.sax.SAXParseException: schema_reference.4: Failed to read
schema document XXXX', 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 have tried with several xsd files that seem are ok.
The file path is right.
What also con be?
Thanks,
slc.