You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Anand D <an...@hotmail.com> on 2004/02/06 14:44:03 UTC

Validating using external DTD

Hi all,
   I have an XML which comes through a HTTP request. I want to validate that 
XML with a DTD in the local machine. That XML does not have a DOCTYPE 
element by itself. Can someone tell me how this can be accomplished using 
xerces java.

I had tried the sample "XMLGrammarBuilder.java" which comes with the xerces 
package. But this one seems to validate the XML only if it had the DOCTYPE 
element referencing the DTD. If I removed the DOCTYPE from the XML and ran 
the program, it gives me wrong results. It says the "<root_element>" is not 
found.

If someone has a sample, it would be of great help if you can share it with 
me.

Thanks,
Anand

_________________________________________________________________
Marriage? Join BharatMatrimony.com. 
http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org