How can I get the order of an element attribute list? It's not totally necessary for the final processing, but it's nice to:
in a filter, not to gratuitously reorder the attribute list
while debugging, print the data in the same order as it appears in the input
Here's my current attribute processor which does a dictionary-like pass over the attributes.
class MySaxDocumentHandler(xml.sax.handler.ContentHandler):
def startElement(self, name, attrs):
for attrName in attrs.keys():
...