Parse Enclosure tag using android.sax
<p>I want to parse the 'url' attribute in enclosure tag</p>

<p></p>

<p>I have seen only samples using DefaultHandler.any way to do it using android.sax Parser</p>

<p>Enclosure tag is inside the tag 'Item'</p>

<p>Code:</p>

<pre><code>public List&lt;Message&gt; parse() throws IOException, SAXException {
        final Message currentMessage = new Message();
        RootElement root = new RootElement(RSS);
        final List&lt;Message&gt; messages = new ArrayList&lt;Message&gt;();
        Element channel = root.getChild(CHANNEL);

        channel.getChild(LASTBUILDATE).setEndTextElementListener(new EndTextElementListener(){
            public void end(String body) {
                lastBuildDate = body;
            }
        });
        Element item = channel.getChild(ITEM);

        item.setEndElementListener(new EndElementListener(){
            public void end() {
                currentMessage.setLastBuildDate(lastBuildDate);
                messages.add(currentMessage.copy());
            }
        });
        item.getChild(TITLE).setEndTextElementListener(new EndTextElementListener(){
            public void end(String body) {
                currentMessage.setTitle(body);
            }
        });
        item.getChild(LINK).setEndTextElementListener(new EndTextElementListener(){
            public void end(String body) {
                currentMessage.setLink(body);
            }
        });


        item.getChild(DESCRIPTION).setEndTextElementListener(new EndTextElementListener(){
            public void end(String body) {
                currentMessage.setDescription(body);
            }
        });
        item.getChild(PUB_DATE).setEndTextElementListener(new EndTextElementListener(){
            public void end(String body) {
                currentMessage.setDate(body);
            }
        });
        item.getChild(CATEGORY).setEndTextElementListener(new EndTextElementListener(){
            public void end(String body) {
                currentMessage.setCategory(body);
            }
        });
        item.getChild(GUID).setEndTextElementListener(new EndTextElementListener(){
            public void end(String body) {
                currentMessage.setGuid(body);
            }
        });

        Xml.parse(this.getInputStream(), Xml.Encoding.UTF_8, root.getContentHandler());
        return messages;
    }
</code></pre>
