Stop android.sax parsing
<p>I have to parse a rss feed url (xml) which always contains 100 items.
My code is:</p>

<pre><code>public Channel parse(InputStream is) throws IOException{
    RootElement root = new RootElement("rss");
    Element channelElement = root.getChild("channel");
            //... and so on for each element I have a listener like this

            channelElement.setStartElementListener(new StartElementListener(){

        @Override
        public void start(Attributes arg0) {
            channel = new Channel();    
            items = new Items();
        }

    });

            //to start parsing I do
            Xml.parse(is, Xml.Encoding.UTF_8,root.getContentHandler()); 
</code></pre>

<p>Now, as download and parse the entire 100 items file is slow, but I can't control feed source I wanted to know if I could manually stop the parsing earlier than the end of the file, so I don't have to download all the stream.</p>

<p>edit:
input stream is taken from an URLConnection.</p>
