I am trying to validate my xml using JDOM way of validating against schema but all the time i get same error:
I get SAXParse Exception and when i check the cause i get this:
"cvc-elt.1: Cannot find the declaration of element 'document'".
I take the XML and if i validate it using XML SPY it is a Valid XML.
I am confused, why am i not able to validate by the code ?
My code is as follows:
SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser", true);
builder.setFeature(" true);
builder.setProperty(" xsdPath);
Document doc = builder.build(xmlFile);
Is that something wrong i am trying ?
waiting
thanks
I get SAXParse Exception and when i check the cause i get this:
"cvc-elt.1: Cannot find the declaration of element 'document'".
I take the XML and if i validate it using XML SPY it is a Valid XML.
I am confused, why am i not able to validate by the code ?
My code is as follows:
SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser", true);
builder.setFeature(" true);
builder.setProperty(" xsdPath);
Document doc = builder.build(xmlFile);
Is that something wrong i am trying ?
waiting
thanks