Android Getting Error While Parseing The XML - At line 1, Column 0 - no element found

徘徊边缘 提交于 2019-12-06 07:40:41

Your reading your inputstream twice.

 InputSource is = new InputSource(url.openStream());

This:

 new BufferedReader(new InputStreamReader(is.getByteStream()));

and

  xmlReader.parse(is);

both read the InputStream, that is a no no.

Remove the BufferedReader and the while loop (they were only there to confirm the XML had downloaded anyway which you say it has)

I can't find a link to back up my theory. Best I could find -Reading an IS twice-

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!