Java (Android) regular expression to strip out HTML paragraph

Posted by jackbot on Stack Overflow See other posts from Stack Overflow or by jackbot
Published on 2010-04-18T21:34:37Z Indexed on 2010/04/18 21:43 UTC
Read the original article Hit count: 325

Filed under:
|
|
|

I have an Android application which grabs some data from an external XML source. I've stripped out some HTML from one of the XML elements, but it's in the format:

<p class="x">Some text...</p>
<p>Some more text</p>
<p>Some final text</p>

I want to extract the middle paragraph text, how can I do this? Would a regular expression be the best way? I don't really want to start including external HTML parsing libraries.

© Stack Overflow or respective owner

Related posts about java

Related posts about android