convert_qubes_xml_to_json

Convert an XML file to a JSON file.

https://qubeshub.org/oaipmh/?verb=ListRecords&metadataPrefix=oai_dc&set=publications” curl URL > qubes_records.xml – or – wget URL -O qubes_records.xml

Attributes

here

msg

msg

old_dict

new_dict

Functions

old_to_new_dict(→ dict[str, str])

Doctest:

xml_to_dict(→ dict | list | str | None)

Convert an XML element and its children to a dictionary.

convert_xml_to_json(→ None)

Convert XML file to JSON file.

Module Contents

convert_qubes_xml_to_json.here
convert_qubes_xml_to_json.msg = 'Will not overwrite existing file: Uninferable'
convert_qubes_xml_to_json.msg = 'Could not find XML file: Uninferable'
convert_qubes_xml_to_json.old_dict
convert_qubes_xml_to_json.new_dict
convert_qubes_xml_to_json.old_to_new_dict(old_dict: dict[str, dict | str]) dict[str, str]

Doctest: >>> old_to_new_dict(old_dict) == new_dict True

convert_qubes_xml_to_json.xml_to_dict(element: xml.etree.ElementTree.Element) dict | list | str | None

Convert an XML element and its children to a dictionary.

convert_qubes_xml_to_json.convert_xml_to_json(xml_file: os.PathLike, json_file: os.PathLike) None

Convert XML file to JSON file.