• Post Reply Bookmark Topic Watch Topic
  • New Topic

Document Scanning  RSS feed

 
Charles Mulloy
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to create a method that will scan a web page and return data within a certain set of tags. Like all the data within a <div> list. If the list was like this:


I would like the method to return a a string array to list the options. However the pages have other div groups, so I need to specify which ones (luckily they have unique name, id, and class values.)

I'm not asking anyone to fabricate this for me, but to steer me in the right direction. I can tell that it would be a lot of hard work, but that will just make it more satisfying when I finish. Am I looking for a parser, or something else?
 
Rob Poulos
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I officially have no idea what i am talking about but i would think that you would want to have a flag and when <div is seen your flag triggers. Everything there after is written to a local file or console or whatever you want. Then when </div is seen the flag untriggers and you stop writing to whatever output you are writing the info to.
 
Paul Clapham
Sheriff
Posts: 22526
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have the HTML, then yes, you're looking for an HTML parser. Java HTML parsers do exist, you have only to google for them.
 
john varenda
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi.....
I can't understand the problem.
explain it clearly because its very useful for me to load the answer..

Thanks.........
..............................

data entry india
 
Campbell Ritchie
Marshal
Posts: 55793
164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch

Please tell us more specifically what your questions are, and I shan't know the answer ( ), but somebody else doubtless will.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!