public static void validate(InputSource source) throws SAXException, ParserConfigurationException, IOException {
  SAXParserFactory factory=SAXParserFactory.newInstance();
  factory.setValidating(true);
  SAXParser parser=factory.newSAXParser();
  parser.parse(source,new DTDValidationHelper());
}

public static void validate ( InputSource source ) throws SAXException , ParserConfigurationException , IOException { SAXParserFactory factory = SAXParserFactory . newInstance ( ) ; factory . setValidating ( true ) ; SAXParser parser = factory . newSAXParser ( ) ; parser . parse ( source , new DTDValidationHelper ( ) ) ; }
validate an inline - mention - form document against a dtd .
