Monday, 15 September 2014

Jsoup and "image" tag



I tried to parse XML file using Java Jsoup.


XML:



<images>
<image>http://ift.tt/1qWJii8;
<image>http://ift.tt/1qWJkqn;
<image>http://ift.tt/1qWJiia;
</images>


Code:



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);


Output:



<images>
<img />http://ift.tt/1y6YiAv
<img />http://ift.tt/1y6YiAx
<img />http://ift.tt/1qWJiih
</images>


My question: What happens with my "image" tag? How I can disable such transformation?


No comments:

Post a Comment