:py:mod:`dissect.target.plugins.os.windows.task_helpers.tasks_xml` ================================================================== .. py:module:: dissect.target.plugins.os.windows.task_helpers.tasks_xml Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.target.plugins.os.windows.task_helpers.tasks_xml.ScheduledTasks dissect.target.plugins.os.windows.task_helpers.tasks_xml.XmlTask .. py:class:: ScheduledTasks(xml_file: dissect.target.helpers.fsutil.TargetPath) .. py:method:: strip_namespace(data: xml.etree.ElementTree.Element) -> xml.etree.ElementTree.Element Strip namespace from XML data. If the data has a namespace, it will be removed from all the XML tags. :param data: The XML data as an Element object. :returns: The XML data with the stripped namespace. .. py:method:: get_tasks() .. py:class:: XmlTask(task_element: xml.etree.ElementTree.Element, task_path: dissect.target.helpers.fsutil.TargetPath) Initialize the XmlTask class for open XML-based task files. :param xml_file: the file to be parsed. :param target: the target system. .. py:method:: strip_namespace(data: xml.etree.ElementTree.Element) -> xml.etree.ElementTree.Element Strip namespace from XML data. If the data has a namespace, it will be removed from all the XML tags. :param data: The XML data as an Element object. :returns: The XML data with the stripped namespace. .. py:method:: get_element(xml_path: str, xml_data: Optional[xml.etree.ElementTree.Element] = None, attribute: Optional[str] = None) -> Optional[str] Get the value of the specified XML element. :param xml_path: The string used to locate the element. :param xml_data: The XML data to search in. If not provided, use self.xml_data. :param attribute: The name of a specific attribute from an element that should be returned. :returns: The value of the XML element if found, otherwise None. :rtype: str .. py:method:: get_raw(xml_path: Optional[str] = None) -> str Get the raw XML data of the specified element. :param xml_path: The string used to locate the element. :returns: The raw XML data as string of the element if found, otherwise None. :rtype: bytes .. py:method:: get_triggers() -> Iterator[flow.record.GroupedRecord] Get the triggers from the XML task data. :Yields: *GroupedRecord* -- The grouped record representing a trigger. .. py:method:: get_actions() -> Iterator[flow.record.RecordDescriptor] Get the actions from the XML task data. :Yields: *ActionRecord* -- The action record representing an action.