This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get particular data after parsing url content  RSS feed

 
K. Tsang
Bartender
Posts: 3648
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: 4686
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: 3648
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!