You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Scott Dewitt <de...@us.ibm.com> on 2001/06/30 21:23:20 UTC
How to force validation with a specific DTD?
I have a situation where I do not control the XML files I am reading in so
they may not have a DocType declaration in them. However, I do have access
to the DTD that I want the documents I'm working with to conform to. Is
there a way to tell the parser to validate the documents it parses using a
default DTD or to force validation with a given DTD? For example,
something like:
parser.setDefaultDTD( "mydtd.dtd" );
parser.parser( myInputSource );
Any ideas on how I could do this?
Thanks,
Scott
-==================================================-
Scott DeWitt IBM WebSphere Transcoding Publisher
dewittsc@us.ibm.com
(919) 486.1919 t/l 526.1919
-==================================================-
---------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org