Hello All

I do not know whether i am posting this query in proper forum or not. if i
am wrong, Pls tell me the right forum for posting query mails.

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

Brajendra Singh
Software Engineer
Max Ateev Limited
A 26/2, Mohan Cooperative Indstl. Area
New Delhi - 110044
Tel: +91 11 6950410  Ext. 172
Fax: +91 11 6950400
www.maxateev.com


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

Reply via email to