Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem !!  RSS feed

 
Manoj Singh
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
I am trying to catch the contents of a web page in a string and then I want to catch all the links present in that page in another array of strings. I am not getting how to do the later part. Please help !!
Thank you
Manoj
 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If u have a web page as a file, then u need to use a BufferedReader to read the file line by line using the readLine method, which returns each line as a string. then u can divide the whole string into words using StringTokenizer. then u can compare each word to a string that represent the link tag...
hope that this is clear, or I may didnt understand ur application completely. please specify what u think, I may provide u with the required segment of code.
Regards,
mac.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!