• 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

how to get particular data after parsing url content

 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank for your replies. I finally worked thru and got the data I wanted.
 
reply
    Bookmark Topic Watch Topic
  • New Topic