Skip to content

Commit e67001c

Browse files
committed
XML normalization minor fix
1 parent 0fa970a commit e67001c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

data_reader/readers/xml_reader.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ def normalize_element(element: Element, normalized):
4646
attrs = None
4747
normalized[sub.tag] = {'@attributes': attrs, 'value': sub.text}
4848

49+
attrs = element.attrib
50+
if attrs == {}:
51+
attrs = None
52+
normalized['@attributes'] = attrs
53+
4954
return normalized
5055

5156
@staticmethod

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setuptools.setup(
99
name='data-reader',
10-
version='0.0.7',
10+
version='0.0.8',
1111
author='Ibragim Abubakarov',
1212
author_email='[email protected]',
1313
maintainer='Ibragim Abubakarov',

0 commit comments

Comments
 (0)