Grabbing and reading text file

Reply

Join Date: Apr 2007
Posts: 2
Reputation: yoas is an unknown quantity at this point 
Solved Threads: 0
yoas yoas is offline Offline
Newbie Poster

Grabbing and reading text file

 
0
  #1
Apr 30th, 2007
Hello...
i want to grab the currency value from bloomberg, this is a part of bloomberg html. I want to get USD-SGD value, in this time the value is 1.5198. How can i grab it using c language?
please help me, because after this, i will translate to dynamic c...

  1. <td bgcolor="#D2E1E8">NZD-USD</td>
  2. <td bgcolor="#D2E1E8" align="right">0.7388</td>
  3. <td bgcolor="#D2E1E8" align="right">
  4. <span class="changedown">-0.0032</span></td>
  5. <td bgcolor="#D2E1E8" align="right">
  6. <span class="changedown">-0.4313%</span></td>
  7. <td bgcolor="#D2E1E8" align="right">00:23</td>
  8. </tr>
  9.  
  10. <tr>
  11. <td bgcolor="white">USD-SGD</td>
  12. <td bgcolor="white" align="right">1.5198</td>
  13. <td bgcolor="white" align="right">
  14. <span class="changeup">0.0038</span></td>
  15. <td bgcolor="white" align="right">
  16. <span class="changeup">0.2540%</span></td>
  17. <td bgcolor="white" align="right">00:23</td></tr>
  18.  
  19. [FONT=verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif]
thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,039
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: Grabbing and reading text file

 
0
  #2
Apr 30th, 2007
You could write a full-blown HTML parser, you could use somebody else's HTML parser, or you could use a cheapo solution that looks for strings like NZD-USD and walks their way forward through values.

And you'll need to grab the page from the webserver, too.

I'm not sure what you're asking -- is there some particular part of this process you need help with?
All my posts may be redistributed under the GNU Free Documentation License.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 29
Reputation: fulyaoner is an unknown quantity at this point 
Solved Threads: 2
fulyaoner's Avatar
fulyaoner fulyaoner is offline Offline
Light Poster

Re: Grabbing and reading text file

 
0
  #3
Apr 30th, 2007
i think you can connect to the page via sockets programming in c.
and then try parsing the page like seaching the currency values.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 2
Reputation: yoas is an unknown quantity at this point 
Solved Threads: 0
yoas yoas is offline Offline
Newbie Poster

Re: Grabbing and reading text file

 
0
  #4
Apr 30th, 2007
i using microprocessor RCM3200 for server, so i don't using computer. The microprocessor just using dynamic c. I think i can see html as text, so i can parse it.
anyone has a sample script similar/like my problem?

thank you...
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 1
Reputation: Omarcito is an unknown quantity at this point 
Solved Threads: 0
Omarcito Omarcito is offline Offline
Newbie Poster

Re: Grabbing and reading text file

 
0
  #5
Apr 9th, 2008
I work with rcm3200 and i work with HTML, only send the text
by the port 80 like a tcp string. you don't need format the text... ...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC