Open
Description
The DMARC Reports from eg. web.de and gmx.de contain a XML Namespace declarated in the feedback-tag:
These XML files cannot be parsed by the script.
I've added the following at line 56 to remove the namespace if existend:
# If the XML contains a xmlns Namespace, remove it
try:
for elem in xml.iter():
tag_elements = elem.tag.split("}")
elem.tag = tag_elements[1]
elem.attrib.clear()
except:
pass
The code tries to split up the XML element at the closing bracket of the namespace. If one is existend the namespace is removed, if non is existend, an error accures, which let's it jump to the except: statement.
Metadata
Metadata
Assignees
Labels
No labels