https://pymotw.com/2/xml/etree/ElementTree/
xml.etree.ElementTree – XML Manipulation API¶
| Purpose: | Generate and parse XML documents |
|---|---|
| Python Version: | 2.5 and later |
The ElementTree library was contributed to the standard library by Fredrick Lundh. It includes tools for parsing XML using event-based and document-based APIs, searching parsed documents with XPath expressions, and creating new or modifying existing documents.
Note
All of the examples in this section use the Python implementation of ElementTree for simplicity, but there is also a C implementation in xml.etree.cElementTree.
See also
-
xml.etree.ElementTree
- The standard library documentation for this module. ElementTree Overview
- Fredrick Lundh’s original documentation and links to the development versions of the ElementTree library. Process XML in Python with ElementTree
- IBM DeveloperWorks article by David Mertz. lxml.etree
- A separate implementation of the ElementTree API based on libxml2 with more complete XPath support.
本文介绍了Python标准库中的ElementTree模块,该模块由Fredrick Lundh贡献,用于生成和解析XML文档。ElementTree提供了基于事件和文档的API来解析XML,并支持XPath表达式进行节点搜索,还允许创建新的XML文档。
368

被折叠的 条评论
为什么被折叠?



