title: How to parse HTML into text in Java
body: <p>I have a program to connect to the internet and read the file. But its result is always in html.. how can i possible turn it into normal text..</p>
  
  <p>here's the code:</p>
  
  <pre><code>package urlconnectionreader;
  import java.net.*;
  import java.io.*;
  
  public class URLConnectionReader {
  
      public static void main(String[] args) throws IOException{
          System.out.println("Hi!");
          URL oracle = new URL("http://www.oracle.com/");
          URLConnection yc = oracle.openConnection();
          yc.setRequestProperty("Content-type", "text/xml");
          yc.setRequestProperty("Accept", "text/xml, application/xml");
          BufferedReader in = new BufferedReader(new InputStreamReader(
                                      yc.getInputStream()));
          String inputLine;
          while ((inputLine = in.readLine()) != null) 
              System.out.println(inputLine);
          in.close();
  
      }
  }
  </code></pre>
  
  <p>--EDITED--</p>
  
  <p>I want to get rid of html tags in its output.</p>