Hello

I am facing a problem. I am trying to validate a xml file against a schema
xsd file.

code is some thing like this -

>>>>

SAXParser parser = new SAXParser();

 parser.setErrorHandler (this);

 parser.setFeature("http://xml.org/sax/features/validation",true);

parser.setFeature ("http://apache.org/xml/features/validation/schema";,
true);

parser.parse(xmlFile);

<<<<<

Error handler is defined in the same program.

When  i am running this program, it is thorwing error like -

>>>

Error:  org.xml.sax.SAXParseException: Element type "attribute" must be
declared.

Error:  org.xml.sax.SAXParseException: Attribute "name" must be declared
for element type "attribute".

<<<

And this type of error message is comming for every elemets and attributes
in xml file.

Can someone tell me the problem area.

Thanks in advance for any help


Brajendra Singh


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to