Calling clojure.xml/parse
with a String
parameter (URI) is similar to this java code:
SAXParserFactory.newInstance().newSAXParser().parse("<your_uri>", <instance of XMLHandler provided by Clojure>);
Clojure does not perform a HTTP GET request. It just uses SAX parser as default parser. Sax parser internally creates an instance of XMLInputSource
and passes it all the way down to XMLEntityManager
. Class XMLEntityManager
does all the work related to opening connection and getting your xml (or more like html) document:
URL location = new URL(expandedSystemId);
URLConnection connect = location.openConnection();
... skip ...
stream = connect.getInputStream();
If XmlInputSource
is an instance of HTTPInputSource
, then XMLEntityManager
sets up HTTP request properties. However, there is no similar functionality for XMLInputSource
(which is what we have in case of SAXParser).
I guess you what might help you is changing your SAX parser to some other implementation.