Mercurial > genshi > mirror
comparison markup/plugin.py @ 183:1f6ca5028770 trunk
Follow-up to [227]. Forgot to rename one instance of `Attributes`.
author | cmlenz |
---|---|
date | Mon, 21 Aug 2006 23:06:38 +0000 |
parents | 2f30ce3fb85e |
children | b64e36bc1100 |
comparison
equal
deleted
inserted
replaced
182:2f30ce3fb85e | 183:1f6ca5028770 |
---|---|
25 """Converts the given ElementTree element to a markup stream.""" | 25 """Converts the given ElementTree element to a markup stream.""" |
26 tag_name = element.tag | 26 tag_name = element.tag |
27 if tag_name.startswith('{'): | 27 if tag_name.startswith('{'): |
28 tag_name = tag_name[1:] | 28 tag_name = tag_name[1:] |
29 tag_name = QName(tag_name) | 29 tag_name = QName(tag_name) |
30 attrib = Attributes(element.items()) | 30 attrib = Attrs(element.items()) |
31 | 31 |
32 yield (Stream.START, (tag_name, attrib), (None, -1, -1)) | 32 yield (Stream.START, (tag_name, attrib), (None, -1, -1)) |
33 if element.text: | 33 if element.text: |
34 yield Stream.TEXT, element.text, (None, -1, -1) | 34 yield Stream.TEXT, element.text, (None, -1, -1) |
35 for child in element.getchildren(): | 35 for child in element.getchildren(): |