def get_parent_child_from_xpath(name):
    """Returns the parent and child elements from XPath."""
    if '/' in name:
        (pname, label) = name.rsplit('/', 1)
    else:
        pname = None
        label = name
    return (pname, label)