I'd like to read the attributes from a node in my xml - file, but i didn't
found an example for this. Could someone help me please?
I ghet the attribute count work neither.
example - xml file
<test>
<muh attr1="test1" attr2="test">ku limuh</muh>
</test>
example python - script
ctxt = doc.xpathNewCon text()
res = ctxt.xpathEval( "//test/muh")
for myres in res:
print myres.Attribute Count
File "/usr/lib/python2.2/site-packages/libxml2.py", line 189, in __getattr__
raise AttributeError, attr
AttributeError: AttributeCount
found an example for this. Could someone help me please?
I ghet the attribute count work neither.
example - xml file
<test>
<muh attr1="test1" attr2="test">ku limuh</muh>
</test>
example python - script
ctxt = doc.xpathNewCon text()
res = ctxt.xpathEval( "//test/muh")
for myres in res:
print myres.Attribute Count
File "/usr/lib/python2.2/site-packages/libxml2.py", line 189, in __getattr__
raise AttributeError, attr
AttributeError: AttributeCount