def marcxml2record(marcxml):
marcjson = create_record(marcxml, keep_singletons=False)<EOL>collections = _get_collections(marcjson)<EOL>if '<STR_LIT>' in collections:<EOL><INDENT>return conferences.do(marcjson)<EOL><DEDENT>elif '<STR_LIT:data>' in collections:<EOL><INDENT>return data.do(marcjson)<EOL><DEDENT>elif '<STR_LIT>' in collections:<EOL><INDENT>return experiments.do(marcjson)<EOL><DEDENT>elif '<STR_LIT>' in collections:<EOL><INDENT>return hepnames.do(marcjson)<EOL><DEDENT>elif '<STR_LIT>' in collections:<EOL><INDENT>return institutions.do(marcjson)<EOL><DEDENT>elif '<STR_LIT>' in collections or '<STR_LIT>' in collections:<EOL><INDENT>return jobs.do(marcjson)<EOL><DEDENT>elif '<STR_LIT>' in collections or '<STR_LIT>' in collections:<EOL><INDENT>return journals.do(marcjson)<EOL><DEDENT>return hep.do(marcjson)<EOL>
Convert a MARCXML string to a JSON record.

    Tries to guess which set of rules to use by inspecting the contents
    of the ``980__a`` MARC field, but falls back to HEP in case nothing
    matches, because records belonging to special collections logically
    belong to the Literature collection but don't have ``980__a:HEP``.

    Args:
        marcxml(str): a string containing MARCXML.

    Returns:
        dict: a JSON record converted from the string.