I have this method:
@Override
protected Document doInBackground(String... params) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
try {
URL url = new URL(params[0]);
return factory.newDocumentBuilder().parse(url.openStream());
} catch(Exception e) {
e.printStackTrace();
return null;
}
Instead of returning Document containing the XML file I am attempting to parse, this method returns a Document containing: org.apache.harmony.xml.dom.DocumentImpl@3f9ee43b