一个使用NekoHTML解析html的例子

NekoHTML 可以解析、修整和净化html文档,可以自动关闭标记,修补一些常见的错误,也可以用NekoHTML从html文档里抽取文本。

NekoHTML is a simple HTML scanner and tag balancer that enables application programmers to parse HTML documents and access the information using standard XML interfaces. The parser can scan HTML files and "fix up" many common mistakes that human (and computer) authors make in writing HTML documents. NekoHTML adds missing parent elements; automatically closes elements with optional end tags; and can handle mismatched inline element tags.[......]

阅读全文