ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  XML Document Validation with an XML Schema
Subject:   Not able to get it to work :(
Date:   2005-04-20 14:10:39
From:   dvohra09
Response to: Not able to get it to work :(

Set the schema validation and schema validation full-checking features.


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


Because the schema validation is not set the parser parses with a DTD which may not be specified.