mt_metadata.transfer_functions.io.emtfxml.metadata.helpers

Created on Wed Mar 8 19:53:04 2023

@author: jpeacock

Functions

to_xml(cls[, string, required, order])

Convert a class instance to an XML element.

Module Contents

mt_metadata.transfer_functions.io.emtfxml.metadata.helpers.to_xml(cls, string=False, required=True, order=None)

Convert a class instance to an XML element.

Parameters:
  • string (bool, optional) – Whether to return the XML as a string, by default False

  • required (bool, optional) – Whether the XML element is required, by default True

  • order (list, optional) – The order of attributes to include, by default None

Returns:

The XML representation of the class instance.

Return type:

str | et.Element