Fatal Error :1:1: Content is not allowed in prolog

后端 未结 6 1038
旧时难觅i
旧时难觅i 2021-01-01 09:58

I\'m using Java and i\'m trying to get XML document from some http link. Code I\'m using is:

URL url = new URL(link);

HttpURLConnection connection = (HttpUR         


        
6条回答
  •  长情又很酷
    2021-01-01 10:35

    Someone should mark Johannes Weiß's comment as the answer to this question. That is exactly why xml documents can't just be loaded in a DOM Document class.

    http://en.wikipedia.org/wiki/Byte_order_mark

提交回复
热议问题