def _attr2dict(attr):
    """
    Create a dictionary from the attributes of an XML node

    :arg attr: A minidom node.

    :return: A dictionary with pairing of node-attribute names and values.
    Integer string values are converted to integers.
    :rtype: dictionary
    """
    attr_dict = {}
    for key, value in attr.items():
        if value.isdigit():
            value = int(value)
        attr_dict[key] = value
    return attr_dict