Parsing using HTMLParser
<pre><code>Parser parser = new Parser();
    parser.setInputHTML("d:/index.html");
    parser.setEncoding("UTF-8");
    NodeList nl = parser.parse(null); 
    /*
    SimpleNodeIterator sNI=list.elements();
    while(sNI.hasMoreNodes()){
    System.out.println(sNI.nextNode().getText());}
    */
    NodeList trs = nl.extractAllNodesThatMatch(new TagNameFilter("tr"),true);
    for(int i=0;i&lt;trs.size();i++) {
        NodeList nodes = trs.elementAt(i).getChildren();
        NodeList tds  = nodes.extractAllNodesThatMatch(new TagNameFilter("td"),true);
    System.out.println(tds.toString());
</code></pre>

<p>I am not getting any output, eclipse shows javaw.exe terminated.</p>
