Java Reference
In-Depth Information
You can see this table list in Figure 6.3.
Figure 6.3: An HTML Table
As you can see there is a table of all fifty US states, along with capital cities and official
link. This recipe will show how to extract these states, and their this data. The recipe is shown
in Listing 6.6.
Listing 6.6: Parse a Table (ParseTable.java)
package com.heatonresearch.httprecipes.ch6.recipe3;
import java.io.*;
import java.net.*;
import java.util.*;
import com.heatonresearch.httprecipes.html.*;
public class ParseTable
{
/** Advance to the specified HTML tag.
* @param parse The HTML parse object to use.
Search WWH ::




Custom Search