Why am I getting this error Premature end of file?

后端 未结 7 2037
滥情空心
滥情空心 2020-12-16 10:40

I am trying to parse an XML response, but I am failing miserably. I thought initially that the xml was just not being returned in the response, so

相关标签:
7条回答
  • 2020-12-16 11:40

    For those who reached this post for Answer:

    This happens mainly because the InputStream the DOM parser is consuming is empty

    So in what I ran across, there might be two situations:

    1. The InputStream you passed into the parser has been used and thus emptied.
    2. The File or whatever you created the InputStream from may be an empty file or string or whatever. The emptiness might be the reason caused the problem. So you need to check your source of the InputStream.
    0 讨论(0)
提交回复
热议问题