algebraixlib.io.xml module

Import data from XML.

algebraixlib.io.xml.import_xml(xml_file_or_filepath, convert_numerics: bool=False) → 'P( A x M )'[source]

Import the file xml_file_or_filepath as XML file and return nested relations.

Parameters:
  • xml_file_or_filepath – A file path or a file object of the file to be imported.
  • convert_numerics – If True, numeric values (integers, floating-point numbers) are imported as number types. If False (default), everything is imported as string.
Returns:

A nested relation starting with a relation that contains a single couplet that represents the single XML root element.