Sax parser getting stuck When parsing Html as string
<p>I am using sax parser to parse XML as string in my application .When my code send HTML body as string then sax parser getting stuck for longer time (more than 5 hour).</p>

<p>Page source url : "<a href="http://www.cityam.com/taxonomy/term/1/all/feed" rel="nofollow">http://www.cityam.com/taxonomy/term/1/all/feed</a>" which i want to parse.
This url giving HTML page instead of XML.
How to handle this kind of problem or how to get out from my saxParser with appropriate exception.
My code is here </p>

<pre><code>public List&lt;RssEntry&gt; parseDocument(String body) {
    // expected body is xml but getting stuck when get body of html page.
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
        SAXParser parser = factory.newSAXParser();
        XMLReader reader = parser.getXMLReader();   
        parser.parse(new ByteArrayInputStream(body.getBytes("UTF-8")), this);
    }

    some catch block
</code></pre>

<p>Please help me.Thanks </p>
