I am trying to parse an XML file which i get from a URL.
When parsing the XML from a local file from the Assets folder, there is no problem:
InputStream is = getAssets().open("xml-test.xml");
Document dom = db.parse(is);
This works fine But when i try to get the data from the web:
InputStream in = httpConnection.getInputStream();
Document dom = db.parse(in);
i get the SAX exception.
specifically: "Unexpected Token (Position:TEXT {"Quotes": [{"Quo...@1:678 in java:io:InputStreamReader@41772e00)
the local file contains the same data as coming from the URL:
This is the URL:
Why is there a SAXException?
Thanks!