[XML-SIG] Getting namespace aware parser to work...

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Tue, 20 Mar 2001 08:17:31 +0100


> I'm trying to process the following xml file, with
> this python script to strip all elements with a 
> given namespace.  I believe that I have a pretty
> recent version (0.5.2).  I get the error following...

Thanks for your bug report. It would be interesting to find out what
version you are using; 0.5.x is not fairly recent - 0.6.2 would be.

In any case, I cannot reproduce the problem with 0.6.4, and I doubt
anything relevant has changed since 0.6.2 in this respect. What
version of Expat are you using (the one included with PyXML or a
different one)?

Looking at the error you get

>     qname = self._current_context[name[0]] + ":" + name[1]
> TypeError: bad operand type(s) for +

I would really like to know what self._current_context[name[0]] and
name[1] are at this point. I found a problem with default namespaces,
but otherwise, the code appears to be correct.

Regards,
Martin

P.S. Please send patches as unified (-u) or context (-c) diffs.