]> granicus.if.org Git - python/commitdiff
Fix typo in xml.dom.pulldom.rst
authorBerker Peksag <berker.peksag@gmail.com>
Wed, 30 Mar 2016 13:28:43 +0000 (16:28 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Wed, 30 Mar 2016 13:28:43 +0000 (16:28 +0300)
Reported by Matthew Cole on docs@p.o.

Doc/library/xml.dom.pulldom.rst

index a3b8bc166a01a366d63ff6cc59b0c0886ecb1ec7..98329a2239d7034817d680fe07deefbf2a3b5716 100644 (file)
@@ -114,13 +114,15 @@ DOMEventStream Objects
 
       Expands all children of *node* into *node*. Example::
 
+          from xml.dom import pulldom
+
           xml = '<html><title>Foo</title> <p>Some text <div>and more</div></p> </html>'
           doc = pulldom.parseString(xml)
           for event, node in doc:
               if event == pulldom.START_ELEMENT and node.tagName == 'p':
                   # Following statement only prints '<p/>'
                   print(node.toxml())
-                  doc.exandNode(node)
+                  doc.expandNode(node)
                   # Following statement prints node with all its children '<p>Some text <div>and more</div></p>'
                   print(node.toxml())