ccsds_ndm.ndm_xml_io

CCSDS Navigation Data Messages XML File I/O.

Classes

NdmXmlIo()

Unified I/O Model for XML input and output.

class NdmXmlIo[source]

Unified I/O Model for XML input and output.

from_bytes(xml_source)[source]

Reads the input bytes array to extract contents to an object of correct type.

Parameters:

xml_source (bytes) – input bytes array

Returns:

object – Object tree from the file contents

from_path(xml_read_file_path)[source]

Reads the file to extract contents to an object of correct type.

Parameters:

xml_read_file_path (Path or AnyStr) – Path of the XML file to be read

Returns:

object – Object tree from the file contents

from_string(xml_source)[source]

Reads the input string to extract contents to an object of correct type.

Parameters:

xml_source (str) – input string data

Returns:

object – Object tree from the file contents

to_file(ndm_obj, xml_write_file_path, schema_location=None, no_namespace_schema_location=None)[source]

Convert the given object tree as xml file.

Parameters:
  • ndm_obj – input object tree

  • xml_write_file_path (Path) – Path of the XML file to be written

  • schema_location (str | None) – Specify the xsi:schemaLocation attribute value

  • no_namespace_schema_location (str | None) – Specify the xsi:noNamespaceSchemaLocation attribute value

to_string(ndm_obj, schema_location=None, no_namespace_schema_location=None)[source]

Convert and return the given object tree as xml string.

Parameters:
  • ndm_obj – input object tree

  • schema_location (str | None) – Specify the xsi:schemaLocation attribute value

  • no_namespace_schema_location (str | None) – Specify the xsi:noNamespaceSchemaLocation attribute value

Returns:

str – given object tree as xml string

Return type:

str