[XML-SIG] getAttribute??

Alexandre Fayolle Alexandre.Fayolle@logilab.fr
Mon, 28 May 2001 20:51:32 +0200 (CEST)


On Mon, 28 May 2001, Dom Linu wrote:

> I have tried this many different ways, but it never seems to work and I
> always abandon PyXML in favor of something else... so I'll ask here, why
> does this fail:
>  
> >>> from xml.dom.ext.reader.Sax2 import FromXml
> >>> doc = FromXml("<mydoc id='123'>text here</mydoc>")
> >>> elem = doc.documentElement
> >>> attr = elem.getAttribute("id")

Try this: 

attr = elem.getAttributeNS('','id')

Alexandre Fayolle
-- 
http://www.logilab.com 
Narval is the first software agent available as free software (GPL).
LOGILAB, Paris (France).