def children_by_tag(xml, tag):
    """Find all matches, at depth 1.

    Note that tag may be a tag, or it may be "tag,name".  This is ugly
    but useful.
    """
    name = None
    if ',' in tag:
        name = ','.join(tag.split(',')[1:])
        tag = tag.split(',')[0]

    matches = xml.findall(tag)
    if name is not None:
        matches = [m for m in matches if m.get("name") == name]
    return matches