2009-07-26 10 views
3

Ich finde leichten HTML-Parser zum Übersetzen in formatierten Text. zum Beispiel:leichter HTML-Parser zum Übersetzen in formatierten Text?

<html> 
<body> 
<a href="http://www.google.com/">Google</a> 
<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> 

in:

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 

mit XML/XSLT-Bibliotheken sind Overkill dafür.

Antwort

1

Sie können sich die Quelle eines Open-Source-Text-Browsers ansehen (z. B. lynx).

0

Ich habe endlich htmlcxx für dieses Problem ausgewählt. Es ist leicht genug.

Verwandte Themen