Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does a java SAX parser actually retrieve the DTD from the internet?

With an XML file that declares a DOCTYPE, take the struts.xml file for instance:

Does the Java SAX processing actually go get the dtd from the provided URL?

like image 553
chad Avatar asked Nov 30 '12 22:11

chad


1 Answers

Many (most) implementations will, even though technically, if I remember correctly, the location is meant to be interpreted as a URI, not URL.

If you want to be sure to resolve it locally, take a look at the EntityResolver interface.

like image 112
GreyBeardedGeek Avatar answered Sep 18 '22 10:09

GreyBeardedGeek