mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
4f1353ab10
commit
bf8ab77f94
|
@ -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,10 +901,10 @@ 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`.
|
||||
: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::
|
||||
|
||||
|
|
Loading…
Reference in New Issue