@staticmethod
def get_rule_id_by_name(root, rule_name):
    """Get the rule ID based on name."""
    rules = root.findall('rule')
    for rule in rules:
        if rule.find('name').text == rule_name:
            return rule.attrib['id']
