EPCISParser fails to parse tags with namespaces
Hello community,
I like the library very much! I use it with different EPCIS inputs and one contains namespaces. This leads to element.tag
in the form of {urn:epcglobal:epcis:xsd:1}AggregationEvent
Unfortunately all the compare functions fail because of this, e.g.
elif element.tag == 'AggregationEvent':
in EPCISParser
Do you think it makes sense to replace those with:
elif etree.QName(element.tag).localname == 'AggregationEvent':
There are many other places where *.tag is used, e.g. parse_aggregation_event_element
I think I took the sample xml somewhere from fosstrak. The header looks like this:
<EPCISDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:epcglobal:epcis:xsd:1" xmlns:epcglobal="urn:epcglobal:xsd:1" xsi:schemaLocation="urn:epcglobal:epcis:xsd:1 EPCglobal-epcis-1_0.xsd" xmlns:hls="http://schema.hls.com/extension" creationDate="2006-06-25T03:50:00Z" schemaVersion="1.0">
Let me know if you want me to create a pull request.
Cheers, Matthias