Revision 456
Added by Aaron Marcuse-Kubitza almost 13 years ago
lib/xml_dom.py | ||
---|---|---|
128 | 128 |
def __iter__(self): return self |
129 | 129 |
|
130 | 130 |
def curr(self): |
131 |
while True:
|
|
132 |
child = self.iter_.curr()
|
|
133 |
if is_text(child): return (child.tagName, value(child))
|
|
134 |
self.iter_.next()
|
|
131 |
child = self.iter_.curr()
|
|
132 |
name = child.tagName
|
|
133 |
if is_text(child): child = value(child)
|
|
134 |
return (name, child)
|
|
135 | 135 |
|
136 | 136 |
def next(self): |
137 | 137 |
entry = self.curr() |
Also available in: Unified diff
xml_dom.py: In NodeTextEntryIter, return non-text children as-is instead of ignoring them so that XML functions can use them