I want to check my xml file with XSD.
I have no. of XSDs that are internally related.
Below is my Code :
String schemaLang = "http://www.w3.org/2001/XMLSchema";
SchemaFactory jaxp = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = jaxp.newSchema(new StreamSource("<XSD File>"));
Validator validator = schema.newValidator();
DefaultHandler handler = new DefaultHandler();
SAXResult sax = new SAXResult(handler);
SAXSource source = new SAXSource(new InputSource("<XML File>"));
 validator.validate(source, sax);
and I am getting below error :
cvc-elt.1: Cannot find the declaration of element 'abcd:abc'.
can anyone suggest me any resolution ?
Kunal Chauhan