A
Ajay
hi!
for the XML
<appel:RULESET xmlns:appel="http://www.w3.org/2001/02/appelv1"
xmlns3p="http://www.w3.org/2000/12/p3pv1">
<appel:RULE prompt="no">
<p3pOLICY>
<p3p:ACCESS appel:connective="non-and">
<p3p:all/>
</p3p:ACCESS>
</p3pOLICY>
</appel:RULE>
if i getupto the "ACCESS" element and print its attribute name and value
using
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
"non-and"
the statement attribs.getNamedItem("appel:connective") however returns
None.
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.
thanks
cheers
for the XML
<appel:RULESET xmlns:appel="http://www.w3.org/2001/02/appelv1"
xmlns3p="http://www.w3.org/2000/12/p3pv1">
<appel:RULE prompt="no">
<p3pOLICY>
<p3p:ACCESS appel:connective="non-and">
<p3p:all/>
</p3p:ACCESS>
</p3pOLICY>
</appel:RULE>
if i getupto the "ACCESS" element and print its attribute name and value
using
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
"non-and"
the statement attribs.getNamedItem("appel:connective") however returns
None.
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.
thanks
cheers