There was an error while loading. Please reload this page.
2 parents 8a34d41 + 13b3acd commit fe4c012Copy full SHA for fe4c012
1 file changed
Doc/library/xml.dom.pulldom.rst
@@ -114,13 +114,15 @@ DOMEventStream Objects
114
115
Expands all children of *node* into *node*. Example::
116
117
+ from xml.dom import pulldom
118
+
119
xml = '<html><title>Foo</title> <p>Some text <div>and more</div></p> </html>'
120
doc = pulldom.parseString(xml)
121
for event, node in doc:
122
if event == pulldom.START_ELEMENT and node.tagName == 'p':
123
# Following statement only prints '<p/>'
124
print(node.toxml())
- doc.exandNode(node)
125
+ doc.expandNode(node)
126
# Following statement prints node with all its children '<p>Some text <div>and more</div></p>'
127
128
0 commit comments