def path_and_child(self, el):
    (yield (':tag', el.tagName))
    for (name, value) in el.attributes.items():
        (yield (('@%s' % name), value))
    for (i, child) in enumerate(el.childNodes):
        if hasattr(child, 'tagName'):
            (yield (('/%d<%s>' % (i, child.tagName)), child))
        else:
            (yield (('/%d:text' % i), child.data))
def path_and_child(self, el):
    (yield (':tag', el.tagName))
    for (name, value) in el.attributes.items():
        (yield (('@%s' % name), value))
    for (i, child) in enumerate(el.childNodes):
        if hasattr(child, 'tagName'):
            (yield (('/%d<%s>' % (i, child.tagName)), child))
        else:
            (yield (('/%d:text' % i), child.data))