CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 1999
    Posts
    1

    HELP: I need an help on search program!!



    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!!



  2. #2
    Join Date
    Mar 1999
    Posts
    14

    Re: HELP: I need an help on search program!!



    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...




  3. #3
    Join Date
    Apr 1999
    Posts
    3

    Re: HELP: I need an help on search program!!



    Wouldn't it be eneough if we just scan thor the META tag of the HTML Documents?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured