fastoad.io.xml.variable_io_legacy module

Readers for legacy XML format

class fastoad.io.xml.variable_io_legacy.VariableLegacy1XmlFormatter[source]

Bases: VariableXmlBaseFormatter

Formatter for legacy XML format (version “1”)

xml_unit_attribute

The XML attribute key for specifying units

read_variables(data_source: str | PathLike | IO) VariableList

Reads variables from provided data source file.

Parameters:

data_source

Returns:

a list of Variable instance

write_variables(data_source: str | PathLike | IO, variables: VariableList)

Writes variables to defined data source file.

Parameters:
  • data_source

  • variables

xml_io_attribute

The XML attribute key for specifying I/O status