Is it possible to set a timeout when loading an xml directly from a URL?
Builder parser = new Builder();
Document doc = parser.build("http://somehost");
This may take sometimes minutes, and would be really handy to be able to time this out directly in the library.
You need to use build(InputStream inStream) api instead of build(String systemID).
URL url = new URL("http://somehost");
con = url.openConnection();
con.setConnectTimeout(connectTimeout);
con.setReadTimeout(readTimeout);
inStream = con.getInputStream();
Builder parser = new Builder();
Document doc = parser.build(inStream);