0

How would I go about parsing HTML in C++ on my Webserver Application?

1
  • 1
    Which platform ? What do you want to accomplish after the parse ? Commented Feb 16, 2010 at 3:40

3 Answers 3

1

libxml2 has a HTML parser. libxml++ is a wrapper for libxml2, but I'm not sure if it exposes the HTMLparser functionality.

Sign up to request clarification or add additional context in comments.

Comments

0

It will mainly depend on what you want to do retrieve in your webpage. You can try boost::spirit to create your own parser. (Or a Yacc/Lex parser).

If your are looking for more simple information in the HTML page, getc may be good enough...

Comments

0

Hand parsing gets messy, even for relatively trivial cases.

Have you considered a Lexer/Parser, such as Flex/Bison? I highly recommend Antlr - and get AntlrWorks.

A picture is worth a thousand words, so this will tell you why - http://www.antlr.org/works/screenshots/editor.jpg

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.