Revision 4332
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/xml_dom.py | ||
---|---|---|
159 | 159 |
|
160 | 160 |
def next(self): |
161 | 161 |
entry = self.iter_.next() |
162 |
if is_empty(entry): value = None |
|
163 |
else: value = only_child(entry) |
|
164 |
return (entry.tagName, value) |
|
162 |
values = list(NodeIter(entry)) |
|
163 |
if not values: values = None |
|
164 |
elif len(values) == 1: values = values[0] |
|
165 |
return (entry.tagName, values) |
|
165 | 166 |
|
166 | 167 |
##### Parent nodes |
167 | 168 |
|
Also available in: Unified diff
xml_dom.py: NodeEntryIter: Support entries with multiple children