# Structured Markup Processing Tools

Python supports a variety of modules to work with various forms of structured data markup. 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).

- `html` --- 超連結標記語言 (HTML) 支援
- `html.parser` --- 簡單的 HTML 和 XHTML 剖析器
  - HTML 剖析器應用程式範例
  - `HTMLParser` 方法
  - 範例
- `html.entities` --- HTML 一般實體的定義
- XML 處理模組
  - XML 漏洞
  - `defusedxml` 套件
- `xml.etree.cElementTree` --- ElementTree XML API
  - 教學
    - XML tree and elements
    - 剖析 XML
    - Pull API for non-blocking parsing
    - Finding interesting elements
    - 改動 XML 檔案
    - Building XML documents
    - Parsing XML with Namespaces
  - XPath 支援
    - 範例
    - Supported XPath syntax
  - Reference
    - 函式
  - XInclude support
    - 範例
  - Reference
    - 函式
    - Element 物件
    - ElementTree 物件
    - QName 物件
    - TreeBuilder 物件
    - XMLParser 物件
    - XMLPullParser 物件
    - 例外
- `xml.dom` --- Document 物件模型 API
  - 模組內容
  - Objects in the DOM
    - DOMImplementation 物件
    - Node Objects
    - NodeList 物件
    - DocumentType 物件
    - Document Objects
    - Element Objects
    - Attr Objects
    - NamedNodeMap 物件
    - Comment Objects
    - Text and CDATASection Objects
    - ProcessingInstruction 物件
    - 例外
  - Conformance
    - Type Mapping
    - Accessor Methods
- `xml.dom.minidom` --- 最小的 DOM 實作
  - DOM 物件
  - DOM 範例
  - minidom and the DOM standard
- `xml.dom.pulldom` --- 支援建置部分 DOM 樹
  - DOMEventStream 物件
- `xml.sax` --- SAX2 剖析器支援
  - SAXException 物件
- `xml.sax.handler` --- SAX 處理函式的基本類別
  - ContentHandler 物件
  - DTDHandler 物件
  - EntityResolver 物件
  - ErrorHandler 物件
  - LexicalHandler 物件
- `xml.sax.saxutils` --- SAX 工具程式
- `xml.sax.xmlreader` --- XML 剖析器的介面
  - XMLReader 物件
  - IncrementalParser 物件
  - Locator Objects
  - InputSource 物件
  - The `Attributes` Interface
  - The `AttributesNS` Interface
- `xml.parsers.expat` --- 使用 Expat 進行快速 XML 剖析
  - XMLParser 物件
  - ExpatError 例外
  - 範例
  - Content Model Descriptions
  - Expat error constants