Package speakeasy :: Module speakeasy_persistence :: Class Python2_7ElementTree
[hide private]
[frames] | no frames]

Class Python2_7ElementTree

source code

object --+
         |
        Python2_7ElementTree

This facility is built in to Python 2.7's ElementTree as element.iter(). Also built in with Python 2.7 is findall(tagName). We need to use 2.6 for now, so we recreate the facilities

Instance Methods [hide private]
 
__init__(self, python2_6ElementTree)
Pass in an element tree of the old kind.
source code
 
iter(self)
Return an object that supports methods next(), hasNext(), and closeIter().
source code
 
next(self)
Return next subelement in xml tree.
source code
 
hasNext(self)
Return True if at least one element has still not been retrieved via the next() method.
source code
 
closeIter(self)
Indicate that the iterator is no longer needed.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, python2_6ElementTree)
(Constructor)

source code 

Pass in an element tree of the old kind.

Parameters:
  • python2_6ElementTree (ElementTree) - ElementTree instance
Overrides: object.__init__

next(self)

source code 

Return next subelement in xml tree.

Raises:
  • ValueError - if no more elements are available.

closeIter(self)

source code 

Indicate that the iterator is no longer needed. Only after calling this method can a new iterator be obtained via iter().