

def test_namespace_ignore(self):
    xml = '\n        <root xmlns="http://defaultns.com/"\n              xmlns:a="http://a.com/"\n              xmlns:b="http://b.com/">\n          <x>1</x>\n          <a:y>2</a:y>\n          <b:z>3</b:z>\n        </root>\n        '
    d = {
        'root': {
            '@xmlns': 'http://defaultns.com/',
            '@xmlns:a': 'http://a.com/',
            '@xmlns:b': 'http://b.com/',
            'x': '1',
            'a:y': '2',
            'b:z': '3',
        },
    }
    self.assertEqual(parse(xml), d)

dataset/ETHPy150Open martinblech/xmltodict/tests/test_xmltodict.py XMLToDictTestCase.test_namespace_ignore/original