How do I validate XML with a DTD using DOM parser

Hi,
	I have a problem in validating XML with DTD while parsing with
DOM parser. I tried to use the setValidation() method. Since it is
protected I couldn't use it. Then I tried the same with setFeature()
mthod. But this doesn't semm to be working. Here is the code that  have
written
		formParser = new DOMParser();
 
formParser.setFeature("http://xml.org/sax/features/validation",true);
            
            fReader = new FileReader(strFilePath);
            //Create an input source to parse
            iSource = new InputSource(fReader);

            formParser.parse(iSource);

Any pointers to solve this?
Thanks in advance
Sindhu

Received on Wednesday, 1 August 2001 04:39:24 UTC