mirror of
https://github.com/python/cpython
synced 2024-09-15 22:26:46 +00:00
Merge doc fix from 3.3
This commit is contained in:
commit
c020e7f8cb
|
@ -983,8 +983,8 @@ XMLParser Objects
|
|||
.. method:: close()
|
||||
|
||||
Finishes feeding data to the parser. Returns the result of calling the
|
||||
:meth:`~TreeBuilder.close` method of the *target* passed during
|
||||
construction; by default, this is the toplevel document element.
|
||||
``close()`` method of the *target* passed during construction; by default,
|
||||
this is the toplevel document element.
|
||||
|
||||
|
||||
.. method:: doctype(name, pubid, system)
|
||||
|
@ -998,10 +998,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 a new issue