• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Search text in HTML

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Please let me know how to search text in HTML using swings.

Regards,
Seema
 
Sheriff
Posts: 22787
131
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Please let me know what you've done so far.
ShowSomeEffort
SearchFirst
[ August 21, 2008: Message edited by: Rob Prime ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you asking about files you have stored locally, about spidering the web, or about searching a few particular web sites?

Either way, this has nothing to do with Swing, it's about networking and text processing. Also note that SwingIsAProperNoun.
 
Seema Sharma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to read HTML file and based on the search text entered , i need to find that text in the HTML file.

Yes, i am trying to read the HTML file stored locally.
First step i did is reading the HTML file. The program is below:



But exception occurs "java.io.FileNotFoundException". Please help me.

Thanks,
Seema
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is "d://Hello.htm" a valid file path, and does the code have the right to access it? A common cause for FileNotFoundException are missing access privileges.

I'm not sure what keeping the HTML in a JEditorPane adds to searching it, but be aware that that class only supports HTML 3.2, so many HTML features (including CSS) will not be rendered correctly or at all.
 
reply
    Bookmark Topic Watch Topic
  • New Topic