Xml Jsoup与“图像”

Xml Jsoup与“图像”,xml,jsoup,Xml,Jsoup,我尝试使用JavaJSOUP解析XML文件 XML: 输出: <images> <img />http://site.ru/xml_examples/photos/photo1.jpg <img />http://site.ru/xml_examples/photos/photo2.jpg <img />http://site.ru/xml_examples/photos/photo3.jpg </images> 我的问题

我尝试使用JavaJSOUP解析XML文件

XML:

输出:

<images>
  <img />http://site.ru/xml_examples/photos/photo1.jpg
  <img />http://site.ru/xml_examples/photos/photo2.jpg
  <img />http://site.ru/xml_examples/photos/photo3.jpg
</images>
我的问题:我的图像标签会发生什么?如何禁用此类转换?

解决方案使用“xmlParser”:


您应该提供解决方案作为答案。
org.jsoup.Connection.Response res = Jsoup.connect(feedUrl)
                .header("User-Agent", RPL.USER_AGENT)
                .method(org.jsoup.Connection.Method.GET)
                .timeout(60000)
                .execute();
doc = res.parse();
SysLog2.debug("doc = " + doc);
<images>
  <img />http://site.ru/xml_examples/photos/photo1.jpg
  <img />http://site.ru/xml_examples/photos/photo2.jpg
  <img />http://site.ru/xml_examples/photos/photo3.jpg
</images>
org.jsoup.Connection.Response res = Jsoup.connect(feedUrl)
                .header("User-Agent", RPL.USER_AGENT)
                .method(org.jsoup.Connection.Method.GET)
                .timeout(60000)
                .execute();
doc = Jsoup.parse(res.toString(), "", Parser.xmlParser());