I seemed to have encountered a bug with the Abdera conversion logic, specifically how it converts children:
for child in children:
child_data = self.data(child)
if (count[child.tag] == 1
and len(children_list) > 1
and isinstance(children_list[-1], dict)):
# Merge keys to existing dictionary
children_list[-1].update(child_data)
else:
# Add additional text
children_list.append(self.data(child))
The first child node, Services, is placed into a separate dictionary, while the rest of the children are placed in the same dictionary. Because multiple tags with the same keys can be present in XML, all children should probably be placed in separate dictionaries.
I'm working on a PR for this, but if you happen to no what the problem is, let me know.
I seemed to have encountered a bug with the Abdera conversion logic, specifically how it converts children:
When given the following XML data:
I receive the following output from
ab.data(xml_file)
:The first child node,
Services
, is placed into a separate dictionary, while the rest of the children are placed in the same dictionary. Because multiple tags with the same keys can be present in XML, all children should probably be placed in separate dictionaries.I'm working on a PR for this, but if you happen to no what the problem is, let me know.