Revision 139
Added by Aaron Marcuse-Kubitza over 12 years ago
xml_dom.py | ||
---|---|---|
13 | 13 |
|
14 | 14 |
def unescape(str_): return HTMLParser().unescape(str_) |
15 | 15 |
|
16 |
def name_of(node): return node.tagName |
|
17 |
|
|
18 | 16 |
def get_id(node): return node.getAttribute('id') |
19 | 17 |
|
20 | 18 |
def set_id(node, id_): node.setAttribute('id', id_) |
... | ... | |
93 | 91 |
def curr(self): |
94 | 92 |
while True: |
95 | 93 |
child = self.iter_.curr() |
96 |
if is_text(child): return (name_of(child), value(child))
|
|
94 |
if is_text(child): return (child.tagName, value(child))
|
|
97 | 95 |
self.iter_.next() |
98 | 96 |
|
99 | 97 |
def next(self): |
Also available in: Unified diff
xml_dom.py: Changed all uses of name_of(node) to node.tagName