def parse(xml_input, encoding=None, expat=expat, process_namespaces=False,
          namespace_separator=':', **kwargs):
    handler = _DictSAXHandler(namespace_separator=namespace_separator,
                              **kwargs)
    if isinstance(xml_input, _unicode):
        if not encoding:
            encoding = 'utf-8'
        xml_input = xml_input.encode(encoding)
    parser = expat.ParserCreate(
        encoding,
        namespace_separator if process_namespaces else None
    )
    try:
        parser.ordered_attributes = True
    except AttributeError:
        # Jython's expat does not support ordered_attributes
        pass
    parser.StartElementHandler = handler.startElement
    parser.EndElementHandler = handler.endElement
    parser.CharacterDataHandler = handler.characters
    try:
        parser.ParseFile(xml_input)
    except (TypeError, AttributeError):
        parser.Parse(xml_input, True)
    return handler.item
Provides an iterator yielding tuples (feature name, True/False)
dataset/ETHPy150Open haukurk/flask-restapi-recipe/restapi/utils/conversion/xmltodict.py/parse--crossover with--dataset/ETHPy150Open tobych/django-feature-flipper/featureflipper/middleware.py/FeaturesMiddleware.features_from_database