# Path: lib/xmltodict.py
# class ParsingInterrupted(Exception):
# class _DictSAXHandler(object):
#     def __init__(self,
#                  item_depth=0,
#                  item_callback=lambda *args: True,
#                  xml_attribs=True,
#                  attr_prefix='@',
#                  cdata_key='#text',
#                  force_cdata=False,
#                  cdata_separator='',
#                  postprocessor=None,
#                  dict_constructor=OrderedDict,
#                  strip_whitespace=True,
#                  namespace_separator=':',
#                  namespaces=None,
#                  force_list=None):
#     def _build_name(self, full_name):
#     def _attrs_to_dict(self, attrs):
#     def startNamespaceDecl(self, prefix, uri):
#     def startElement(self, full_name, attrs):
#     def endElement(self, full_name):
#     def characters(self, data):
#     def push_data(self, item, key, data):
#     def _should_force_list(self, key, value):
# def parse(xml_input, encoding=None, expat=expat, process_namespaces=False,
#           namespace_separator=':', **kwargs):
# def _process_namespace(name, namespaces, ns_sep=':', attr_prefix='@'):
# def _emit(key, value, content_handler,
#           attr_prefix='@',
#           cdata_key='#text',
#           depth=0,
#           preprocessor=None,
#           pretty=False,
#           newl='\n',
#           indent='\t',
#           namespace_separator=':',
#           namespaces=None,
#           full_document=True):
# def unparse(input_dict, output=None, encoding='utf-8', full_document=True,
#             short_empty_elements=False,
#             **kwargs):
#     def handle_item(path, item):


import json
import sys
from pathlib import Path
from lib import xmltodict
#!/usr/bin/env python3

"""
XML to JSON converter.
"""




def convert(xml_file, xml_attribs=True):
    with open(xml_file, "rb") as f:

# Path: lib/xmltodict.py
# class ParsingInterrupted(Exception):
# class _DictSAXHandler(object):
#     def __init__(self,
#                  item_depth=0,
#                  item_callback=lambda *args: True,
#                  xml_attribs=True,
#                  attr_prefix='@',
#                  cdata_key='#text',
#                  force_cdata=False,
#                  cdata_separator='',
#                  postprocessor=None,
#                  dict_constructor=OrderedDict,
#                  strip_whitespace=True,
#                  namespace_separator=':',
#                  namespaces=None,
#                  force_list=None):
#     def _build_name(self, full_name):
#     def _attrs_to_dict(self, attrs):
#     def startNamespaceDecl(self, prefix, uri):
#     def startElement(self, full_name, attrs):
#     def endElement(self, full_name):
#     def characters(self, data):
#     def push_data(self, item, key, data):
#     def _should_force_list(self, key, value):
# def parse(xml_input, encoding=None, expat=expat, process_namespaces=False,
#           namespace_separator=':', **kwargs):
# def _process_namespace(name, namespaces, ns_sep=':', attr_prefix='@'):
# def _emit(key, value, content_handler,
#           attr_prefix='@',
#           cdata_key='#text',
#           depth=0,
#           preprocessor=None,
#           pretty=False,
#           newl='\n',
#           indent='\t',
#           namespace_separator=':',
#           namespaces=None,
#           full_document=True):
# def unparse(input_dict, output=None, encoding='utf-8', full_document=True,
#             short_empty_elements=False,
#             **kwargs):
#     def handle_item(path, item):


# Path: xml2json.py
import json
import sys
from pathlib import Path
from lib import xmltodict

#!/usr/bin/env python3

"""
XML to JSON converter.
"""




def convert(xml_file, xml_attribs=True):
    with open(xml_file, "rb") as f:

        d = xmltodict.parse(f, xml_attribs=xml_attribs)