diff options
author | Rob Austein <sra@hactrn.net> | 2007-07-30 23:07:12 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-07-30 23:07:12 +0000 |
commit | d8daa419c8bea480ec986baafacb0eec2138b6fb (patch) | |
tree | 60bc059ce67c7433d45bed80a4739162f561ef4b /scripts/rpki/sax_utils.py | |
parent | baebccbe3b346c0629affb0cdb43ec9fe76699c9 (diff) |
Convert to lxml
svn path=/scripts/rpki/relaxng.py; revision=794
Diffstat (limited to 'scripts/rpki/sax_utils.py')
-rw-r--r-- | scripts/rpki/sax_utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/rpki/sax_utils.py b/scripts/rpki/sax_utils.py index d645cc4f..1333df1a 100644 --- a/scripts/rpki/sax_utils.py +++ b/scripts/rpki/sax_utils.py @@ -23,6 +23,12 @@ class handler(xml.sax.handler.ContentHandler): def startElement(self, name, attrs): a = dict() for k,v in attrs.items(): + if isinstance(k, tuple): + if k == ('http://www.w3.org/XML/1998/namespace', 'lang'): + k = "xml:lang" + else: + assert k[0] is None + k = k[1] a[k.encode("ascii")] = v.encode("ascii") if len(self.stack) == 0: assert not hasattr(self, "result") |