def path_and_child(self, doc):
    (yield ('?xml@version', doc.version))
    (yield ('?xml@encoding', doc.encoding))
    (yield ('?xml@standalone', doc.standalone))
    for (i, child) in enumerate(doc.childNodes):
        if hasattr(child, 'tagName'):
            (yield (('/%d<%s>' % (i, child.tagName)), child))
        else:
            (yield (('/%d:text' % i), child.data))
def path_and_child(self, doc):
    (yield ('?xml@version', doc.version))
    (yield ('?xml@encoding', doc.encoding))
    (yield ('?xml@standalone', doc.standalone))
    for (i, child) in enumerate(doc.childNodes):
        if hasattr(child, 'tagName'):
            (yield (('/%d<%s>' % (i, child.tagName)), child))
        else:
            (yield (('/%d:text' % i), child.data))