C
Chang
Actually I am not sure how to word this question, I will try my best.
[ Problem ]
Remove all the HTML code from a give *.html file and show it as text file.
[ My Solution ]
I am using WebBrowser to open (local) html file and using MSHTML to get text
from <body> part of html file.
[ Code ]
// create DocumentClass object by casting
mshtml.HTMLDocumentClass webPage =
(mshtml.HTMLDocumentClass) this.axWebBrowser1.Document;
// get text out of DocumentClass object
this.rtfBox.Text = webPage.body.innerHTML;
[ New Problem ]
I have referenced WebBrowser and MSHtml in my solution. I see InterOp
working here and creating axWebBrowser for me so that I can use it. Now if I
deploy this project some place then do I need to worry about these files
being installed (with the correct version I am referencing to) or I need to
install these files and register them in registry in the target machine? Not
to over lap my first question, is there a better way then my solution?
Thanks,
Chang
[ Problem ]
Remove all the HTML code from a give *.html file and show it as text file.
[ My Solution ]
I am using WebBrowser to open (local) html file and using MSHTML to get text
from <body> part of html file.
[ Code ]
// create DocumentClass object by casting
mshtml.HTMLDocumentClass webPage =
(mshtml.HTMLDocumentClass) this.axWebBrowser1.Document;
// get text out of DocumentClass object
this.rtfBox.Text = webPage.body.innerHTML;
[ New Problem ]
I have referenced WebBrowser and MSHtml in my solution. I see InterOp
working here and creating axWebBrowser for me so that I can use it. Now if I
deploy this project some place then do I need to worry about these files
being installed (with the correct version I am referencing to) or I need to
install these files and register them in registry in the target machine? Not
to over lap my first question, is there a better way then my solution?
Thanks,
Chang