Does anybody know if there exists a class which parses a HTML for tags or/and creates objects of different tags, like text or graphics ?
I'm looking for a class similar HTML::Parser in PERL5.
Printable View
Does anybody know if there exists a class which parses a HTML for tags or/and creates objects of different tags, like text or graphics ?
I'm looking for a class similar HTML::Parser in PERL5.
Hi,
you can use the MSHTML control for this task. By hosting the control you have full access to the Document Object Model.
Martin
Martin
And where can I find MSHTML?
Sally
It is a COM interface, if you have Internet Explorer installed, you have it. Check out the class CHtmlView to get an idea.
Wayne
Thanks a lot for your answer. Is it somewhere properly documented ?
Regards
Dan
Hi Sally,
as Wayne wrote, it belongs to the IE. What you see when you start the IE is in fact nothing else than a COM client which hosts mainly two COM objects, the WebBrowser control, responsible for navigation, and the MSHTML control, responsible for parsing and rendering HTML.
Martin
Martin
Hi Dan,
properly? No. It is documented, but it's awful. You can find it on the MSDN CD. In the index look for Platform SDK -> Internet/Intranet/Extranet Services -> Internet Explorer -> Internet Tools & Technologies, chapters "Reusing the Webbrowser and MSHTML" and "Programming the Document Object Model in C/C++".
HTH
Martin
Hi,
I finally found an example explaining mostly I wanted to know. It's in the VC++ Help under the name "walkall.cpp". It uses the MSHTML stuff you mentioned.
Thanks a lot
Dan