diff options
author | Eli Bendersky <eliben@gmail.com> | 2013-08-25 22:27:36 (GMT) |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2013-08-25 22:27:36 (GMT) |
commit | bf8ab77f940013e42f7b9af5b4fd2100238f389b (patch) | |
tree | 09961400d78a7f556f223dcfe73600f912daa2e4 /Doc | |
parent | 4f1353ab10792f47a51c37f1384f036a1679aec0 (diff) | |
download | cpython-bf8ab77f940013e42f7b9af5b4fd2100238f389b.zip cpython-bf8ab77f940013e42f7b9af5b4fd2100238f389b.tar.gz cpython-bf8ab77f940013e42f7b9af5b4fd2100238f389b.tar.bz2 |
Update XMLParser.close documentation and fix formatting.
Using ``method`` markup because the method is on a callback object, not an
explicitly documented method. :meth: markup creates links within the current
class which is incorrect.
In addition, indent the paragraph correctly.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/xml.etree.elementtree.rst | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index 00cdacd..d0b59ef 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -885,7 +885,9 @@ XMLParser Objects .. method:: close() - Finishes feeding data to the parser. Returns an element structure. + Finishes feeding data to the parser. Returns the result of calling the + ``close()`` method of the *target* passed during construction; by default, + this is the toplevel document element. .. method:: doctype(name, pubid, system) @@ -899,12 +901,12 @@ XMLParser Objects Feeds data to the parser. *data* is encoded data. -:meth:`XMLParser.feed` calls *target*\'s :meth:`start` method -for each opening tag, its :meth:`end` method for each closing tag, -and data is processed by method :meth:`data`. :meth:`XMLParser.close` -calls *target*\'s method :meth:`close`. -:class:`XMLParser` can be used not only for building a tree structure. -This is an example of counting the maximum depth of an XML file:: + :meth:`XMLParser.feed` calls *target*\'s ``start()`` method + for each opening tag, its ``end()`` method for each closing tag, + and data is processed by method ``data()``. :meth:`XMLParser.close` + calls *target*\'s method ``close()``. + :class:`XMLParser` can be used not only for building a tree structure. + This is an example of counting the maximum depth of an XML file:: >>> from xml.etree.ElementTree import XMLParser >>> class MaxDepth: # The target object of the parser |