xmltodict icon indicating copy to clipboard operation
xmltodict copied to clipboard

Request: Use normal dictionaries instead of OrderedDict

Open Guy-Markman opened this issue 3 years ago • 3 comments

Can we get an option that parse will return the object as normal dictionaries instead of OrderedDict?

Guy-Markman avatar Nov 16 '22 12:11 Guy-Markman

xmltodict.parse(xml, dict_constructor=dict) is already available since a few years.

If it's not working for you, you should state your Python version and your xmltodict version.

using dict instead of OrderedDict is also the default if you're using Python 3.7+ (dicts with insertion order are only an implementation detail in C-Python 3.6, not an official Python feature).

related issue: #252

mpf82 avatar Nov 17 '22 12:11 mpf82

The "dict_constructor" keyword is not mentioned in the docstring of parse() - not in v0.12.0, or at HEAD (https://github.com/martinblech/xmltodict/blob/master/xmltodict.py#L202).

ckuethe avatar Jun 06 '23 02:06 ckuethe