By default xmltodict does not return list in case only one element is present, which may lead to problems like this:
test.xml
<a>
<b/>
</a>
test1.xml
<a>
<b/>
<b/>
</a>
xq . test.xml produces
{
"a": {
"b": null
}
}
while xq . test1.xml produces
{
"a": {
"b": [
null,
null
]
}
}
The patch implements a new --xml-force-list switch, which allows forcing the use of arrays for defined tags even if only one occurence is present in the XML source:
By default
xmltodict
does not return list in case only one element is present, which may lead to problems like this:test.xml
test1.xml
xq . test.xml
produceswhile
xq . test1.xml
producesThe patch implements a new
--xml-force-list
switch, which allows forcing the use of arrays for defined tags even if only one occurence is present in the XML source: