def main():
    (options, args_, parser_) = simple_options(_parser, __version__, __dependencies__)

    try:
        with open(options.input) as xml_file:
            xml_string = xml_file.read()

            # At the moment there doesn't seem to be an obvious way to extract the xmlns from the asset.
            # For now, we'll attempt to just remove it before transforming it into a Python object.

            # <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
            #   ==>
            # <COLLADA version="1.4.1">
            if options.namespace is False:
                xml_string = sub(' xmlns="[^"]*"', '', xml_string)

            json_string = xml2json(xml_string, indent=options.json_indent, convert_types=options.convert_types)
            if options.output:
                with open(options.output, 'w') as target:
                    target.write(json_string)
                    target.write('\n')
            else:
                print json_string

    except __HOLE__ as e:
        LOG.error(e)
        return e.errno
    except Exception as e:
        LOG.critical('Unexpected exception: %s', e)
        return 1
dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/xml2json.py/main