Java Reference
In-Depth Information
Figure 6.7: The Missouri Sub-Page
The actual data that we would like to gather is located on the sub-page. However, to find
each sub-page we must process the list on the main page. This recipe shows how to extract
data from all of the sub-pages. The recipe is shown in Listing 6.9.
Listing 6.9: Parse HTML Sub-Pages (ExtractSubPage.java)
package com.heatonresearch.httprecipes.ch6.recipe6;
import java.io.*;
import java.net.*;
import com.heatonresearch.httprecipes.html.*;
public class ExtractSubPage
{
/*
* The size buffer to use for downloading.
*/
public static int BUFFER_SIZE = 8192;
Search WWH ::




Custom Search