G
Guest
I want write a program with c# to pars a html file how ccan i do this with system.mshtml? or there is other way to do it p;ease help me?
with system.mshtml? or there is other way to do it p;ease help me?Aditya Ghuwalewala said:Consider the HTML file as a simple XML.
You can do it by loading the HTML file in an XML document object--
XMLDocument doc = new XMLDocument();
doc.Load("yourfile");
Now you can parse through the doc object using XMLDocument class library (like SelectNodes etc.)
cheers
Aditya
----- majid wrote: -----
I want write a program with c# to pars a html file how ccan i do this
system.mshtml? or there is other way to do it p;ease help me?majid said:I want write a program with c# to pars a html file how ccan i do this with
pchapman said:Embed a IE hidden browser control in your application.
It has a navigate method that takes an url and an event that fires
when the page has finished loading...
On finished loading, use the document object to get the dom. The
browser will have parsed it all for you...
50 lines of code...at most...parse any html the browser can
display...
Peter