How to strip all html tags and extract content using java?
<p>I have a requirement to escape all html tags from a string and extract only the content. I will have an HTML content as input. for example</p>

<p><code>&lt;html&gt;&lt;body&gt;&lt;input type=’text’ value=’Hello World’ size=’50’ /&gt; &lt;div&gt; This is a basic example &lt;/div&gt;&lt;br/&gt;&lt;span align=’center’&gt;Hello Sam!!!&lt;/span&gt;&lt;/body&gt;&lt;html&gt;</code></p>

<p>I need the output as below :</p>

<pre><code>Hello World. This is a basic example.
Hello Sam!!!
</code></pre>

<p>I have tried to use HtmlCleaner and even JSoup. First of all I am not getting any full sample application of them. I was able to extract  </p>

<pre><code>This is a basic example.
Hello Sam!!!
</code></pre>

<p>using HTMLCleaner but could not extract the textbox value as it’s an attribute. Please help. </p>
