首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 轻量级的HTML数据流分析器。

轻量级的HTML数据流分析器。

  • 资源大小:610.00 B
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: html 数据流 分析器 轻量级

资 源 简 介

It is a lightweight, simple, low memory usage, non-verifying HTML stream parser. Originally written for embedded devices. Parsing HTML stream char by char. Not building HTML tree. Supports invalid HTML code. Here are a simple C programs that illustrates how to use the parser API. You can run all programs with this command (assuming a name of the program is "a.out"): wget -O - -q "http://code.google.com" | ./a.out This one prints a tags names not using buffer. ``` #include #include int main(void) { char c, new_line = 1; HTMLSTREAMPARSER *hsp = html_parser_init(); while ((c = getchar()) != EOF) { html_parser_char_parse(hsp, c); if (html_parser_is_in(hsp, HTML_NAME)) { new_line = 1; printf("%c", c); } else if (new_line) { new_line = 0; printf(" "); } } html_parser_cleanup(hsp);

文 件 列 表

package
htmlstreamparser
htmlstreamparser
Makefile
VIP VIP
0.296065s