@staticmethod
def _getdata(theroot):
    """Get a set of child node data and a mapping of data to node."""
    lookup = {}
    data = []
    for c in theroot.childnodes:
        d = c.data[0]
        lookup[d] = c
        data.append(d)
    return lookup, set(data)
