[XML-SIG] help - attributes namespace - is this a bug in PyXML

Ajay abra9823 at mail.usyd.edu.au
Mon Aug 16 17:45:50 CEST 2004


for the XML
<appel:RULESET xmlns:appel="http://www.w3.org/2001/02/appelv1"
<appel:RULE prompt="no">
  <p3p:ACCESS appel:connective="non-and">

if i getupto the "ACCESS" element and print its attribute name and value
if attribs != None and len(attribs) > 0:
        index = 0
	while index < attribs.length:
		print "attribute ", index, ": ",     attribs.item(index).nodeName, " has
value: ", attribs.item(index).nodeValue
		index += 1

it prints ACCESS having the attribute "appel:connective" with the value
the statement attribs.getNamedItem("appel:connective") however returns
now i think its substituting the namespace for appel but then how would you
access the attribute, just 'connective' doesn't work, 'appel:connective'
doesn't either and http://www.w3.org/2001/02/appelv1:connective doesn't
work either.



Ajay Brar,
CS Honours 2004
Smart Internet Technology Research Group

This message was sent using IMP, the Internet Messaging Program.

More information about the XML-SIG mailing list