2009-07-26 2 views
3

서식있는 텍스트로 변환하기위한 경량 HTML 구문 분석기를 찾고 있습니다.가벼운 HTML 서식있는 텍스트로 변환하기위한 파서?

<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> 

에 : 예를 들어

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 

사용하여 XML/XSLT 라이브러리는 그것을 위해 과잉이다.

답변

1

오픈 소스 텍스트 브라우저 (fyn.lynx)의 소스를 살펴볼 수 있습니다.

0

나는이 문제에 대해 마침내 htmlcxx를 선택했다. 그것은 충분히 가볍습니다.

관련 문제