Structured Markup Processing Tools结构化标记处理工具¶
Python supports a variety of modules to work with various forms of structured data markup. Python支持各种模块来处理各种形式的结构化数据标记。This includes modules to work with the Standard Generalized Markup Language (SGML) and the Hypertext Markup Language (HTML), and several interfaces for working with the Extensible Markup Language (XML).这包括使用标准通用标记语言(SGML)和超文本标记语言(HTML)的模块,以及使用可扩展标记语言(XML)的几个接口。
html
—HyperText Markup Language support超文本标记语言支持html.parser
—Simple HTML and XHTML parser简单的HTML和XHTML解析器html.entities
—Definitions of HTML general entitiesHTML通用实体的定义XML Processing ModulesXML处理模块xml.etree.ElementTree
—The ElementTree XML APIElementTree XML APIxml.dom
—The Document Object Model API文档对象模型APIxml.dom.minidom
—Minimal DOM implementation最小DOM实现xml.dom.pulldom
—Support for building partial DOM trees支持构建部分DOM树xml.sax
—Support for SAX2 parsers支持SAX2解析器xml.sax.handler
—Base classes for SAX handlersSAX处理程序的基类xml.sax.saxutils
—SAX UtilitiesSAX实用程序xml.sax.xmlreader
—Interface for XML parsersXML解析器接口xml.parsers.expat
—Fast XML parsing using Expat使用Expat快速解析XML