[XML-SIG] Attribute none object

Sébastien Pierre spierre@isb-sib.ch
Fri, 4 Jan 2002 13:33:00 +0100


Hi all,

This may be a PyXML related issued, but as it is from 4DOM I 
post it on 4Suite also...

Using PyXML 0.66, 4Suite 0.11, I do the following:

a = node.getAttributeNS('','src'))
print a
a = node.attributes.getNamedItem('src')
print a
print a.nodeValue

The first print does nothing (blank line), so obviously a is None

The second print is:
<Attribute Node at c62c8c: Name="src", 
Value="../Schemas/Planning-Preliminary.png">

The third one generates an exception:
AttributeError: 'None' object has no attribute 'nodeValue'

So in this case a is an Attr at the second print and then 
becomes None at the following one... I'm puzzled.

Any ideas?

  -- Sébastien

--
«Too old to be alternative, too alternative to be old.»
  http://www.type-z.org | Robert Smith, talking about his epitaph.