HtmlParser給我們提供的Tag比較多.但是像這樣的網頁好像都是不行哦.因為HtmlParser只提供到  TableColumn, TableHeader, TableRow, TableTag, 沒有直接提供tr,td這種一看就明白的Tag,那我們如何解決這個問題.方法就是繼承HtmlParser的Tag.呵呵.其實繼承他很簡單.看代碼.

public class TrTag extends CompositeTag {
    
/**
     * The set of names handled by this tag.
     
*/

    
private static final String[] mIds = new String[] "TR" };

    
/**
     * The set of end tag names that indicate the end of this tag.
     
*/

    
private static final String[] mEndTagEnders = new String[] "TABLE" };

    
/**
     * Create a new div tag.
     
*/

    
public TrTag() {
    }


    
/**
     * Return the set of names handled by this tag.
     * 
     * 
@return The names to be matched that create tags of this type.
     
*/

    
public String[] getIds() {
        
return (mIds);
    }


    
/**
     * Return the set of end tag names that cause this tag to finish.
     * 
     * 
@return The names of following end tags that stop further scanning.
     
*/

    
public String[] getEndTagEnders() {
        
return (mEndTagEnders);
    }

}

呵呵.有了這一招,對待這樣的NBA網頁易如反掌了.當然了對待其他標簽也一樣的做法.

==================說明分隔線===========
說的很簡單.請大家諒解.:)