aaron792
06-13-2008, 09:22 PM
I am writing a java project to extract some specifec information from some specific webpages.I know using the following statements could download the html source of current webpage.
URL url=new URL(urlStr);
InputStream in=url.openStream();
BufferedReader buffRead = new BufferedReader(new InputStreamReader(in, wpEncoding));
But my problem is the information concerned is stored in another short .htm file referenced by current webpage's source .htm file. I can use the "save as" function of IE to save the current webpage and then the short .htm file is automatically incorporated in the correspoding .files directory and I can see the information I want. But how can I locate the .htm file in the java project? :confused:
URL url=new URL(urlStr);
InputStream in=url.openStream();
BufferedReader buffRead = new BufferedReader(new InputStreamReader(in, wpEncoding));
But my problem is the information concerned is stored in another short .htm file referenced by current webpage's source .htm file. I can use the "save as" function of IE to save the current webpage and then the short .htm file is automatically incorporated in the correspoding .files directory and I can see the information I want. But how can I locate the .htm file in the java project? :confused: