def get_dom_attr_value(dom, tag_name, attr_name):
    """
    Return value of a tag's attribute from dom (XML file).
    Arguments:
        tag_name -- name of dom tag in which the attribute is found.
        attr_name -- name of dom attribute for which the value should be returned.
    """
    tag=dom.getElementsByTagName(tag_name)
    value=tag[0].attributes[attr_name].value
    return value