Note that there are some explanatory texts on larger screens.

plurals
  1. POIssue on parsing Html with jsoup
    primarykey
    data
    text
    <p>I am trying to parse this <a href="http://feeds.reuters.com/reuters/audio/newsmakerus/rss/mp3/" rel="nofollow">HTML</a> using jsoup.</p> <p>My code is:</p> <pre><code>doc = Jsoup.connect(htmlUrl).timeout(1000 * 1000).get(); Elements items = doc.select("item"); Log.d(TAG, "Items size : " + items.size()); for (Element item : items) { Log.d(TAG, "in for loop of items"); Element titleElement = item.select("title").first(); mTitle = titleElement.text().toString(); Log.d(TAG, "title is : " + mTitle); Element linkElement = item.select("link").first(); mLink = linkElement.text().toString(); Log.d(TAG, "link is : " + mLink); Element descElement = item.select("description").first(); mDesc = descElement.text().toString(); Log.d(TAG, "description is : " + mDesc); } </code></pre> <p>I am getting following output:</p> <pre><code>in for loop of items D/HtmlParser( 6690): title is : Indonesian president: Some multinationals "take too much" D/HtmlParser( 6690): link is : D/HtmlParser( 6690): description is : April 23 - Indonesian President Susilo Bambang Yudhoyono tells a Thomson Reuters Newsmaker event that the country welcomes foreign investment in its resources sector, but must receive a "fair share" of benefits.&lt;div class="feedflare"&gt; &lt;a href="http://feeds.reuters.com/~ff/reuters/audio/newsmakerus/rss/mp3?a=NX3AY96GfGk:hAtGeOq2ESs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/reuters/audio/newsmakerus/rss/mp3?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.reuters.com/~ff/reuters/audio/newsmakerus/rss/mp3?a=NX3AY96GfGk:hAtGeOq2ESs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/reuters/audio/newsmakerus/rss/mp3?i=NX3AY96GfGk:hAtGeOq2ESs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.reuters.com/~ff/reuters/audio/newsmakerus/rss/mp3?a=NX3AY96GfGk:hAtGeOq2ESs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/reuters/audio/newsmakerus/rss/mp3?i=NX3AY96GfGk:hAtGeOq2ESs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/reuters/audio/newsmakerus/rss/mp3/~4/NX3AY96GfGk" height="1" width="1"/&gt; </code></pre> <p>But I want output as:</p> <pre><code>in for loop of items D/HtmlParser( 6690): title is : Indonesian president: Some multinationals "take too much" D/HtmlParser( 6690): link is : http://feeds.reuters.com/~r/reuters/audio/newsmakerus/rss/mp3/~3/KDcQe4gF-3U/62828262.mp3 D/HtmlParser( 6690): description is : April 23 - Indonesian President Susilo Bambang Yudhoyono tells a Thomson Reuters Newsmaker event that the country welcomes foreign investment in its resources sector, but must receive a "fair share" of benefits. </code></pre> <p>What should I change in my code?</p> <p>How to achieve my goal. Please help me!!</p> <p>Thank you in advance!!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload