954,505 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Grabbing and reading text file

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...

<td bgcolor="#D2E1E8">NZD-USD</td>
<td bgcolor="#D2E1E8" align="right">0.7388</td>
<td bgcolor="#D2E1E8" align="right">
<span class="changedown">-0.0032</span></td>
<td bgcolor="#D2E1E8" align="right">
<span class="changedown">-0.4313%</span></td>
<td bgcolor="#D2E1E8" align="right">00:23</td>
</tr>

<tr>
<td bgcolor="white">USD-SGD</td>
<td bgcolor="white" align="right">1.5198</td>
<td bgcolor="white" align="right">
<span class="changeup">0.0038</span></td>
<td bgcolor="white" align="right">
<span class="changeup">0.2540%</span></td>
<td bgcolor="white" align="right">00:23</td></tr>

[FONT=verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif]



thanks in advance

yoas
Newbie Poster
2 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

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?

Rashakil Fol
Super Senior Demiposter
Team Colleague
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
 

i think you can connect to the page via sockets programming in c.
and then try parsing the page like seaching the currency values.

fulyaoner
Light Poster
29 posts since May 2006
Reputation Points: 10
Solved Threads: 2
 

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...

yoas
Newbie Poster
2 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

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... ...

Omarcito
Newbie Poster
1 post since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You