I\'m using jsoup to parse an rss feed using java. I\'m having problems getting a result when trying to select the first element in the document.
Your rss feed is XML, not HTML. For this to work, you must tell JSoup to use its XMLParser. This will work:
String rss = ""
+""
+ "The Blog Title "
+ "http://www.the.blog/category"
+" ";
Document doc = Jsoup.parse(rss, "", Parser.xmlParser());
Element link = doc.select("rss channel link").first();
System.out.println(link.text()); // prints empty string
Explanation:
The link tag in HTML follows a different format and Jsoup tries to interpret the of your rss as such html tag.