[Python-checkins] cpython (merge 3.5 -> default): Fix typo in xml.dom.pulldom.rst
berker.peksag
python-checkins at python.org
Wed Mar 30 09:29:03 EDT 2016
https://hg.python.org/cpython/rev/854018bf929f
changeset: 100799:854018bf929f
parent: 100797:e47e00723e5d
parent: 100798:a38c6e6084cb
user: Berker Peksag <berker.peksag at gmail.com>
date: Wed Mar 30 16:29:01 2016 +0300
summary:
Fix typo in xml.dom.pulldom.rst
Reported by Matthew Cole on docs at p.o.
files:
Doc/library/xml.dom.pulldom.rst | 4 +++-
1 files changed, 3 insertions(+), 1 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
@@ -114,13 +114,15 @@
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())
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list