How to read a value from a table in an Web Page(html) that I get as a attachment to my mail box.? Re

  • Thread starter Thread starter EfraimT
  • Start date Start date
E

EfraimT

Hello all!
Thank you for spending your time reading my problem.

I recive a daily mail with a file attached to it, the file is an HTML
file containing a table of currencey values per one USA Dollar,
I need to write a small Window(DescTop)- application, which will read a
value from that table and will update my DB With that value.
the page is already in my inbox not on the web, So no download is
needed.

I can find out how to open the file from the attachment, i may even
want the program to run immediatly when I recive the mail by creating a
rule on my Outlook that will call my program, I am still not sure how
to do it.
but My main dilema is: if to open the HTML file as stream like a text
file and search for the value, or maybe there is a class that will
represent the web page and thru this I can run over the controls of the
web page and get to my row and value.
I saw somthing about RegEX, Is that what I need??? Someone can show me
how to start with it?
Any help and suggestions about any part of this process will be
appriciated!

Thanks in advance!
 
Is it the same page each day and is the page layout consistent?? If so then
I did something very similar and used REGEX to do it. I will try and find an
example of my code.

Best wishes

Paul Bromley
 
I recive a daily mail with a file attached to it, the file is an HTML
file containing a table of currencey values per one USA Dollar,
I need to write a small Window(DescTop)- application, which will read a
value from that table and will update my DB With that value.
the page is already in my inbox not on the web, So no download is
needed.

Parsing an HTML file:

MSHTML Reference
<URL:http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/reference.asp>

- or -

..NET Html Agility Pack: How to use malformed HTML just like it was
well-formed XML...
<URL:http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx>

Download:

<URL:http://www.codefluent.com/smourier/download/htmlagilitypack.zip>

- or -

SgmlReader 1.4
<URL:http://www.gotdotnet.com/Community/...mpleGuid=B90FDDCE-E60D-43F8-A5C4-C3BD760564BC>

If the file read is in XHTML format, you can use the classes contained in
the 'System.Xml' namespace for reading information from the file.
 
Herfried K. Wagner, Cor and Paul Thanks so much.

Paul, the mail is the same every day and also the structure of the file
is the same. I will be very happy if you can find the code that you
rote and post it or send me otherways. (algtho at the meantime I am
trying the interesting things that Herfried sent).

Herfried , I did look a litelbit into the sgml and the AgilityHTML -
which I am going to try first, it looks simple and well done, and it
comes with the source code. Thank you.

I will look also into the example of MSHTML that Cor pointed.

Thank you all again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top