diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -35,17 +35,16 @@ The :class:`ElementTree` class can be used to wrap an element structure, and convert it from and to XML. -A C implementation of this API is available as :mod:`xml.etree.cElementTree`. - See http://effbot.org/zone/element-index.htm for tutorials and links to other -docs. Fredrik Lundh's page is also the location of the development version of -the xml.etree.ElementTree. +docs. .. versionchanged:: 2.7 The ElementTree API is updated to 1.3. For more information, see `Introducing ElementTree 1.3 `_. +This documentation applies equally to :mod:`xml.etree.ElementTree` and +:mod:`xml.etree.cElementTree`. .. _elementtree-functions: @@ -649,3 +648,19 @@ appropriate standards. For example, "UTF-8" is valid, but "UTF8" is not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl and http://www.iana.org/assignments/character-sets. + +:mod:`xml.etree.cElementTree` --- A Faster ElementTree +====================================================== + +.. module:: xml.etree.cElementTree + :synopsis: C Implementation of the ElementTree API. +.. moduleauthor:: Fredrik Lundh + +The CPython standard library also comes with a faster, compatible implementation +of the ElementTree API written in C. Typical usage looks like this:: + + try: + from xml.etree import cElementTree as ET + except ImportError: + from xml.etree import ElementTree as ET +