Parsing HTML

Started by
3 comments, last by antareus 20 years, 8 months ago
I need a basic HTML control. Does Windows have a very basic one? I do NOT want an embedded instance of IE - I can only imagine the horrors of exploits spreading using my app instantaneously. Therefore MFC''s CHtmlView is definitely out. Inevitably, this means I will probably have to take a RichEdit box and convert the HTML to rich edit styles. What would the best way to parse HTML be? Should I learn something like boost::spirit? I shudder at doing this as a parsing newbie (I really should take that compilers class before I leave college).
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
Advertisement
quote:Original post by antareus
I do NOT want an embedded instance of IE - I can only imagine the horrors of exploits spreading using my app instantaneously. Therefore MFC''s CHtmlView is definitely out.


I''m confused. If you''re running an unpatched IE, wouldn''t you say you have problems regardless of whether or not your app use CHTMLView.

How appropriate. You fight like a cow.
Very true.

CHTMLView is overkill for a messaging chat window though.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
quote:Original post by antareus
Very true.

CHTMLView is overkill for a messaging chat window though.
Not really. Actually, IIRC, there''s a couple of messaging clients out there already that use it. When you think about it, it''s more or less ideal for the task. CRichEdit is another possibility, but it''s slightly more limited, and from personal experience I can say that converting HTML to other stuff royally sucks. It''s a pain in the ass to deal with all the syntax incompatibilities people expect to get away with. Of course, if you''re only going to be parsing HTML produced by a specific application, it might be a bit easier.

How appropriate. You fight like a cow.
Hmm, I guess I will and mark it as a TODO. Thanks for being pragmatic.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis

This topic is closed to new replies.

Advertisement