Python_API_Structured Markup Processing Tools_sgmllib.SGMLParser
来源:互联网 发布:美国网络战司令部 编辑:程序博客网 时间:2024/06/05 09:09
API文档:
This module defines a class SGMLParser which serves as the basis for parsing text files formatted in SGML (Standard Generalized Mark-up Language). In fact, it does not provide a full SGML parser — it only parses SGML insofar as it is used by HTML, and the module only exists as a base for the htmllib module. Another HTML parser which supports XHTML and offers a somewhat different interface is available in the HTMLParser module.
- classsgmllib.SGMLParser
- The SGMLParser class is instantiated without arguments. The parser is hardcoded to recognize the following constructs:
- Opening and closing tags of the form <tag attr="value" ...> and </tag>, respectively.
- Numeric character references of the form &#name;.
- Entity references of the form &name;.
- SGML comments of the form <!--text-->. Note that spaces, tabs, and newlines are allowed between the trailing> and the immediately preceding--.
翻译文档:
这个模块定义了一个SGMLParser类,这个类提供了解析SGML(标准通用标示语言)的功能。
但是他并没有提供完整的对SGML的解析功能。这个模块只是为htmllib模块定义了一个基本的方法。这个HTMLParser模块定义了以写可解析XHTML的方法和其他功能。
这个SGMLParser类是不带参数的实例。可通过编码接卸如下文档结构:
可分别标签开始和结束。例如 :<tagattr="value" ...> and </tag>,
特殊字符引用。例如:&#name;.等,16进制字符转化等
实体引用。例如:html©
注释:<!--->
- Python_API_Structured Markup Processing Tools_sgmllib.SGMLParser
- Python_API_Structured Markup Processing Tools_sgmllib.SGMLParser.feed
- Python_API_Structured Markup Processing Tools_sgmllib.SGMLParser.reset
- SGMLParser
- SGMLParser
- SGMLParser
- Markup
- markup.h + markup.cpp
- Python SGMLParser简介
- #小练习 SGMLParser练习
- SGMLParser (二)
- Python爬虫--SGMLParser
- 解析 HTML -- SGMLParser
- markup.h
- markup.cpp
- C++ Markup
- 由于空格引起的xml错误之The processing instruction target matching "[xX][mM][lL]" is not allowed以及the markup in the document prec
- python网页解析之SGMLParser
- 天之虹:浅谈游戏数据的积累、挖掘与分析
- 关于shell脚本编程的10个最佳实践
- SurfaceView
- linux文件系统的系统分析--(八)sysfs中sysfs_dirent与inode dentry的关系
- IP地址库 的处理方法 mysql版
- Python_API_Structured Markup Processing Tools_sgmllib.SGMLParser
- Linux-2.6.32.2内核在mini2440上的移植(一)---构建自主开发环境
- arm-linux-gcc安装与使用
- web安装包中的- iis网站自动配置脚本
- 安卓手机系统可删除的自带软件大集合
- Linux-2.6.32.2内核在mini2440上的移植(二)---yaffs2文件系统移植
- EFM32片内外设--LEUart之基本操作
- 排序算法 - 基数排序(C++)
- Linux-2.6.32.2内核在mini2440上的移植(三)---DM9000网卡驱动移植