Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 13b3acd

Browse files
committed
Fix typo in xml.dom.pulldom.rst
Reported by Matthew Cole on [email protected].
1 parent 53f8ba5 commit 13b3acd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Doc/library/xml.dom.pulldom.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,15 @@ DOMEventStream Objects
114114

115115
Expands all children of *node* into *node*. Example::
116116

117+
from xml.dom import pulldom
118+
117119
xml = '<html><title>Foo</title> <p>Some text <div>and more</div></p> </html>'
118120
doc = pulldom.parseString(xml)
119121
for event, node in doc:
120122
if event == pulldom.START_ELEMENT and node.tagName == 'p':
121123
# Following statement only prints '<p/>'
122124
print(node.toxml())
123-
doc.exandNode(node)
125+
doc.expandNode(node)
124126
# Following statement prints node with all its children '<p>Some text <div>and more</div></p>'
125127
print(node.toxml())
126128

0 commit comments

Comments
 (0)