tags:

views:

171

answers:

3

I'm finding light weight HTML Parser for translating to formatted text. for example:

<html>
<body>
<a href="http://www.google.com/"&gt;Google&lt;/a&gt;
<img src="http://images.google.com/intl/en_us/images/logos/images_logo.gif" alt="Google image logo" />
<ol>
<li>first</li>
<li>second</li>
</ol>
<ul>
<li>apple</li>
<li>orange</li>
</ul>
<table><tr><td>cell a</td><td>&nbsp;</td><td>cell b</td></tr><tr><td>cell c</td><td>cell d</td><td>cell e</td></tr><table>

</body>
</html>

into:

Google (link:http://www.google.com/) (img:Google images logo)

1. first
2. second

- apple
- orange

cell a(tab) (tab)cell b
cell c(tab)cell d(tab)cell e

using xml/xslt libraries are overkill for that.

+1  A: 

You could have a look at the source of an open source text browser (f.e. lynx).

schnaader
A: 

I finally choosed htmlcxx for this issue. It is lightweight enough.

A: 

how to use htmlcss on windows system?

Maplye