Skip to content

Openfromxml

flowtask.components.OpenFromXML

OpenFromXML

OpenFromXML(job=None, *args, **kwargs)

Bases: FlowComponent

OpenFromXML

Overview

    This component opens an XML file and returns it as an XML etree Object.

.. table:: Properties
:widths: auto


+--------------+----------+-----------+-------------------------------------------------------+
| Name         | Required | Summary                                                           |
+--------------+----------+-----------+-------------------------------------------------------+
| directory    |   No     | The directory where the XML file is located.                      |
+--------------+----------+-----------+-------------------------------------------------------+
| filename     |   Yes    | The name of the XML file to be opened.                            |
+--------------+----------+-----------+-------------------------------------------------------+
| use_strings  |   No     | If True, the component will treat the input as a string containing|
|              |          | XML data.                                                         |
+--------------+----------+-----------+-------------------------------------------------------+
| as_nodes     |   No     | If set, specifies the node to be extracted from the XML tree.     |
+--------------+----------+-----------+-------------------------------------------------------+

Returns:

Type Description
  • An lxml.etree.ElementTree object if the entire XML tree is parsed.
  • A list of nodes (lxml.etree.Element) if as_nodes is set.

close async

close()

close. close method

run async

run()

run.

Open the XML file and return the object

start async

start(**kwargs)

start.

Get if directory exists