llal
llal

Reputation: 1

How can I extract text from HTML using c++?

How can I parse HTML tags using c++?

eg:

<html><body>examlpe text </body></html>

Upvotes: 0

Views: 2756

Answers (1)

easel
easel

Reputation: 4048

The easiest option would be to use an HTML parsing library. libxml2 is a solid open-source one, although it's technically a C library. You'd need to load your html and then walk through the DOM pulling out all the text() nodes. I don't know that I'd recommend this as your first C++ task.

Upvotes: 6

Related Questions