Fabio Mangiarulo
March 5th, 1999, 04:20 AM
I need of a Java program that allows at user to search HTML files that include
a word or a phrase that user inserts.
If you can help me !! Thank you!!
SINGH
March 8th, 1999, 12:51 AM
Hi,
You should have the list of the file names in a file or have the name of the directory containing the files.
Suppose you have the file containing the file names.Open the stream to the first file name in that file using BufferedStreamReader.
Read the file line by line using readLine() function.
Check for the existence of the string in that line using indexOf() function.
If it is there write the name of the file in some output file(using printwriter),close this file and continue with the next file.
But as the file is an HTML file,you've to skip the tags like
For that you can check for the "" comes.You should skip the text between these chars.
Singh...
Kethari Nath
March 13th, 1999, 01:08 AM
Wouldn't it be eneough if we just scan thor the META tag of the HTML Documents?