[Python-checkins] cpython (merge default -> default): merge heads
benjamin.peterson
python-checkins at python.org
Fri Mar 16 16:13:41 CET 2012
http://hg.python.org/cpython/rev/8a5b03b77828
changeset: 75744:8a5b03b77828
parent: 75743:17980cb07625
parent: 75742:b2e27f21760e
user: Benjamin Peterson <benjamin at python.org>
date: Fri Mar 16 10:13:30 2012 -0500
summary:
merge heads
files:
Doc/library/xml.dom.pulldom.rst | 27 ++++++++++----------
1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/Doc/library/xml.dom.pulldom.rst b/Doc/library/xml.dom.pulldom.rst
--- a/Doc/library/xml.dom.pulldom.rst
+++ b/Doc/library/xml.dom.pulldom.rst
@@ -44,11 +44,12 @@
Since the document is treated as a "flat" stream of events, the document "tree"
is implicitly traversed and the desired elements are found regardless of their
-depth in the tree. In other words, one does not need to consider hierarchical issues
-such as recursive searching of the document nodes, although if the context of
-elements were important, one would either need to maintain some context-related
-state (ie. remembering where one is in the document at any given point) or to
-make use of the :func:`DOMEventStream.expandNode` method and switch to DOM-related processing.
+depth in the tree. In other words, one does not need to consider hierarchical
+issues such as recursive searching of the document nodes, although if the
+context of elements were important, one would either need to maintain some
+context-related state (i.e. remembering where one is in the document at any
+given point) or to make use of the :func:`DOMEventStream.expandNode` method
+and switch to DOM-related processing.
.. class:: PullDom(documentFactory=None)
@@ -71,11 +72,9 @@
If you have XML in a string, you can use the :func:`parseString` function instead:
-
.. function:: parseString(string, parser=None)
- Return a :class:`DOMEventStream` that represents the (unicode) *string*.
-
+ Return a :class:`DOMEventStream` that represents the (Unicode) *string*.
.. data:: default_bufsize
@@ -84,7 +83,6 @@
The value of this variable can be changed before calling :func:`parse` and
the new value will take effect.
-
.. _domeventstream-objects:
DOMEventStream Objects
@@ -93,16 +91,17 @@
.. class:: DOMEventStream(stream, parser, bufsize)
- .. method:: DOMEventStream.getEvent()
+ .. method:: getEvent()
Return a tuple containing *event* and the current *node* as
- :class:`xml.dom.minidom.Document` if event equals START_DOCUMENT,
- :class:`xml.dom.minidom.Element` if event equals START_ELEMENT or
- END_ELEMENT or :class:`xml.dom.minidom.Text` if event equals CHARACTERS.
+ :class:`xml.dom.minidom.Document` if event equals :data:`START_DOCUMENT`,
+ :class:`xml.dom.minidom.Element` if event equals :data:`START_ELEMENT` or
+ :data:`END_ELEMENT` or :class:`xml.dom.minidom.Text` if event equals
+ :data:`CHARACTERS`.
The current node does not contain informations about its children, unless
:func:`expandNode` is called.
- .. method:: DOMEventStream.expandNode(node)
+ .. method:: expandNode(node)
Expands all children of *node* into *node*. Example::
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list