• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get particular data after parsing url content

 
K. Tsang
Bartender
Posts: 3610
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello I have the following code:


Parsing content from Bloomberg getting html for Sun Micro. Now once I br.readLine() how do I get the particular data say price, volume etc from the variable str? Do I do some string search/comparison? I have no clue.

Never know Sun Micro changed its symbol
[ May 13, 2008: Message edited by: K. Tsang ]
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would need to know the content of the HTML which you get back from the website. If the content page is standard then you can parse the page and strip the data. Try printing the entire page in outputstream to see the data, then you can work on how to strip off the data which you want.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you old code work?

Most folks use a HttpClient to talk to the HTTP server, otherwise you won't properly handled gzip'd, chunked, or other fancy response.
 
K. Tsang
Bartender
Posts: 3610
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank for your replies. I finally worked thru and got the data I wanted.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!