Note that there are some explanatory texts on larger screens.

plurals
  1. PORegarding XML parsing in android
    primarykey
    data
    text
    <p>The project that I'm trying to understand is found <a href="http://www.warriorpoint.com/blog/downloads/" rel="nofollow">here</a>. The project is a code for RSS feeds parsing.In the project the "message.java" is the class whose objects are used to store the messages."Messagelist.java" is the launcher,"RSShandler.java" is the handler which is used when parsing.In "Basefeedparser.java" the following statement is present. I fail to understand as to how the handler which is to be used is identified when you say root.getcontenthandler()? root is simply the RootElement type instantiation.</p> <pre><code>try { Xml.parse(this.getInputStream(), Xml.Encoding.UTF_8, root.getContentHandler()); } catch (Exception e) { throw new RuntimeException(e); } </code></pre> <p>The handler that should(and is) being fetched is the Rsshandler which is correct. But how the identification takes place is the question. I went through the whole code without ever finding a mention about RSShandler class in any of the other three java files. Some pushing in the right direction is called for.</p> <p>I don't see the need to,but just in case you need to know the structure of the XMl response here it is </p> <p></p> <p></p> <pre><code>&lt;title&gt;android_news&lt;/title&gt; &lt;description&gt;android_news&lt;/description&gt; &lt;link&gt;http://www.androidster.com/android_news.php&lt;/link&gt; &lt;lastBuildDate&gt;Sun, 19 Apr 2009 19:43:45 +0100&lt;/lastBuildDate&gt; &lt;generator&gt;FeedCreator 1.7.2&lt;/generator&gt; &lt;item&gt; &lt;title&gt;Samsung S8000 to Run Android, Play DivX, Take Over the World&lt;/title&gt; &lt;link&gt;http://www.androidster.com/android_news/samsung-s8000-to-run-android-play-divx-take-over-the-world&lt;/link&gt; &lt;description&gt;More details have emerged on the first Samsung handset to run Android. A yet-to-be announced phone called the S8000 is being reported ...&lt;/description&gt; &lt;pubDate&gt;Thu, 16 Apr 2009 07:18:51 +0100&lt;/pubDate&gt; &lt;/item&gt; &lt;item&gt; &lt;title&gt;Android Cupcake Update on the Horizon&lt;/title&gt; &lt;link&gt;http://www.androidster.com/android_news/android-cupcake-update-on-the-horizon&lt;/link&gt; &lt;description&gt;After months of discovery and hearsay, the Android build that we have all been waiting for is about to finally make it out ...&lt;/description&gt; &lt;pubDate&gt;Tue, 14 Apr 2009 04:13:21 +0100&lt;/pubDate&gt; &lt;/item&gt; </code></pre> <p></p> <p></p>
    singulars
    1. This table or related slice is empty.
    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.
    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