as2fm.scxml_converter.scxml_entries.xml_utils.get_xml_attribute

as2fm.scxml_converter.scxml_entries.xml_utils.get_xml_attribute(scxml_type: Type[ScxmlBase], xml_tree: Element, arg_name: str, *, undefined_allowed=False, empty_allowed=False) str | None

Load an attribute from the XML tree’s root tag.

Args:

scxml_type: The class of the SCXML element this is defined in. xml_tree: The XML tree element to extract the attribute from. arg_name: The name of the attribute to retrieve. undefined_allowed: If True, allows the attribute to not exist in XML. Defaults to False. empty_allowed: If True, allows the attribute to be an empty string. Defaults to False.

Returns:

The string defined in the attribute if found, otherwise None.