@@ -44,11 +44,12 @@ Example::
4444
4545Since the document is treated as a "flat" stream of events, the document "tree"
4646is implicitly traversed and the desired elements are found regardless of their
47- depth in the tree. In other words, one does not need to consider hierarchical issues
48- such as recursive searching of the document nodes, although if the context of
49- elements were important, one would either need to maintain some context-related
50- state (ie. remembering where one is in the document at any given point) or to
51- make use of the :func: `DOMEventStream.expandNode ` method and switch to DOM-related processing.
47+ depth in the tree. In other words, one does not need to consider hierarchical
48+ issues such as recursive searching of the document nodes, although if the
49+ context of elements were important, one would either need to maintain some
50+ context-related state (i.e. remembering where one is in the document at any
51+ given point) or to make use of the :func: `DOMEventStream.expandNode ` method
52+ and switch to DOM-related processing.
5253
5354
5455.. class :: PullDom(documentFactory=None)
@@ -71,11 +72,9 @@ make use of the :func:`DOMEventStream.expandNode` method and switch to DOM-relat
7172
7273If you have XML in a string, you can use the :func: `parseString ` function instead:
7374
74-
7575.. function :: parseString(string, parser=None)
7676
77- Return a :class: `DOMEventStream ` that represents the (unicode) *string *.
78-
77+ Return a :class: `DOMEventStream ` that represents the (Unicode) *string *.
7978
8079.. data :: default_bufsize
8180
@@ -84,7 +83,6 @@ If you have XML in a string, you can use the :func:`parseString` function instea
8483 The value of this variable can be changed before calling :func: `parse ` and
8584 the new value will take effect.
8685
87-
8886.. _domeventstream-objects :
8987
9088DOMEventStream Objects
@@ -93,16 +91,17 @@ DOMEventStream Objects
9391.. class :: DOMEventStream(stream, parser, bufsize)
9492
9593
96- .. method :: DOMEventStream. getEvent()
94+ .. method :: getEvent()
9795
9896 Return a tuple containing *event * and the current *node * as
99- :class: `xml.dom.minidom.Document ` if event equals START_DOCUMENT,
100- :class: `xml.dom.minidom.Element ` if event equals START_ELEMENT or
101- END_ELEMENT or :class: `xml.dom.minidom.Text ` if event equals CHARACTERS.
97+ :class: `xml.dom.minidom.Document ` if event equals :data: `START_DOCUMENT `,
98+ :class: `xml.dom.minidom.Element ` if event equals :data: `START_ELEMENT ` or
99+ :data: `END_ELEMENT ` or :class: `xml.dom.minidom.Text ` if event equals
100+ :data: `CHARACTERS `.
102101 The current node does not contain informations about its children, unless
103102 :func: `expandNode ` is called.
104103
105- .. method :: DOMEventStream. expandNode(node)
104+ .. method :: expandNode(node)
106105
107106 Expands all children of *node * into *node *. Example::
108107
0 commit comments