[Lxml-checkins] r46730 - lxml/trunk/doc

scoder at codespeak.net scoder at codespeak.net
Wed Sep 19 14:48:26 CEST 2007


Author: scoder
Date: Wed Sep 19 14:48:25 2007
New Revision: 46730

Modified:
   lxml/trunk/doc/parsing.txt
   lxml/trunk/doc/tutorial.txt
Log:
getiterator() -> iter()

Modified: lxml/trunk/doc/parsing.txt
==============================================================================
--- lxml/trunk/doc/parsing.txt	(original)
+++ lxml/trunk/doc/parsing.txt	Wed Sep 19 14:48:25 2007
@@ -269,7 +269,7 @@
 --------------------
 
 As an extension over ElementTree, lxml.etree accepts a ``tag`` keyword
-argument just like ``element.getiterator(tag)``.  This restricts events to a
+argument just like ``element.iter(tag)``.  This restricts events to a
 specific tag or namespace::
 
   >>> context = etree.iterparse(StringIO(xml), tag="element")

Modified: lxml/trunk/doc/tutorial.txt
==============================================================================
--- lxml/trunk/doc/tutorial.txt	(original)
+++ lxml/trunk/doc/tutorial.txt	Wed Sep 19 14:48:25 2007
@@ -310,7 +310,7 @@
       <another>Child 3</another>
     </root>
 
-    >>> for element in root.getiterator():
+    >>> for element in root.iter():
     ...     print element.tag, '-', element.text
     root - None
     child - Child 1
@@ -318,9 +318,9 @@
     another - Child 3
 
 If you know you are only interested in a single tag, you can pass its name to
-``getiterator()`` to have it filter for you::
+``iter()`` to have it filter for you::
 
-    >>> for element in root.getiterator("child"):
+    >>> for element in root.iter("child"):
     ...     print element.tag, '-', element.text
     child - Child 1
     child - Child 2
@@ -462,7 +462,7 @@
 content at leaf elements tends to be data content (even if blank).  You can
 easily remove it in an additional step by traversing the tree::
 
-    >>> for element in root.getiterator("*"):
+    >>> for element in root.iter("*"):
     ...     if element.text is not None and not element.text.strip():
     ...         element.text = None
 


More information about the lxml-checkins mailing list