wxHtmlParser: Extract content of comments

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
ankur1216
In need of some credit
In need of some credit
Posts: 4
Joined: Wed Aug 01, 2018 8:10 pm

wxHtmlParser: Extract content of comments

Post by ankur1216 »

How do I extract the comments section of HTML source using wxHtmlParser?

Code: Select all

<html>
    <body>BODY</body>
    <!-- COMMENTS -->
</html>
And yes I looked through all the wxHtml/wxHtmlParser,etc. Overview and documentation in addition to Google all morning and found nothing helpful.

Any help would be great.
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxHtmlParser: Extract content of comments

Post by doublemax »

I haven't looked into the source code, but i don't think you can do that with wxHtmlParser. By definition a html parser is not interested in comments and i would assume, it just skips them.

It should be easy enough to extract the comments using regular expressions though. (wxRegEx)
Use the source, Luke!
Post Reply