convert_qubes_xml_to_json ========================= .. py:module:: convert_qubes_xml_to_json .. autoapi-nested-parse:: 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 ---------- .. autoapisummary:: convert_qubes_xml_to_json.here convert_qubes_xml_to_json.msg convert_qubes_xml_to_json.msg convert_qubes_xml_to_json.old_dict convert_qubes_xml_to_json.new_dict Functions --------- .. autoapisummary:: convert_qubes_xml_to_json.old_to_new_dict convert_qubes_xml_to_json.xml_to_dict convert_qubes_xml_to_json.convert_xml_to_json Module Contents --------------- .. py:data:: here .. py:data:: msg :value: 'Will not overwrite existing file: Uninferable' .. py:data:: msg :value: 'Could not find XML file: Uninferable' .. py:data:: old_dict .. py:data:: new_dict .. py:function:: old_to_new_dict(old_dict: dict[str, dict | str]) -> dict[str, str] Doctest: >>> old_to_new_dict(old_dict) == new_dict True .. py:function:: xml_to_dict(element: xml.etree.ElementTree.Element) -> dict | list | str | None Convert an XML element and its children to a dictionary. .. py:function:: convert_xml_to_json(xml_file: os.PathLike, json_file: os.PathLike) -> None Convert XML file to JSON file.