You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Melzer, Steven" <St...@Paymentech.com> on 2002/08/14 15:13:45 UTC

ignoring doctype

can you ignore the <!DOCTYPE> tag using the dom parser?

i wrote the following code to create a dom document object:
	DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
	DocumentBuilder builder = factory.newDocumentBuilder();
	Document document = builder.parse("struts-config.xml");

all works fine for files without the DOCTYPE tag.  i get a
ConnectionException, which is because i am behind a proxy server.   i just
want to ignore the external entity altogether.

thanks,
steve

Steven Melzer
E-Business Technology
813.351.2215
steven.melzer@paymentech.com



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


Re: ignoring doctype

Posted by Elena Litani <el...@ca.ibm.com>.
Hi Steven, 

"Melzer, Steven" wrote:
> all works fine for files without the DOCTYPE tag.  i get a
> ConnectionException, which is because i am behind a proxy server.   i just
> want to ignore the external entity altogether.

Use the "http://apache.org/xml/features/nonvalidating/load-external-dtd"
feature: http://xml.apache.org/xerces2-j/features.html.

Thx,
-- 
Elena Litani / IBM Toronto

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