Home | Trees | Index | Help |
|
---|
Package lxml :: Module etree :: Class ElementDepthFirstIterator |
|
object
--+ |_ElementTagMatcher
--+ | ElementDepthFirstIterator
Iterates over an element and its sub-elements in document order (depth first pre-order). Note that this also includes comments, entities and processing instructions. To filter them out, check if the ``tag`` property of the returned element is a string (i.e. not None and not a factory function).
If the optional 'tag' argument is not None, the iterator returns only the elements that match the respective name and namespace.
The optional boolean argument 'inclusive' defaults to True and can be set to False to exclude the start element itself.
Note that the behaviour of this iterator is completely undefined if the tree it traverses is modified during iteration.Method Summary | |
---|---|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature | |
x.__iter__() <==> iter(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
x.next() -> the next value, or raise StopIteration | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Class Variable Summary | |
---|---|
PyCObject |
__pyx_vtable__ = <PyCObject object at 0x401cb770>
|
Method Details |
---|
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for
signature
|
__iter__(x)x.__iter__() <==> iter(x)
|
__new__(T, S, ...)T.__new__(S, ...) -> a new object with type S, a subtype of T
|
next(x)x.next() -> the next value, or raise StopIteration
|
Class Variable Details |
---|
__pyx_vtable__
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Aug 18 12:44:27 2007 | http://epydoc.sf.net |