469,928 Members | 1,900 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,928 developers. It's quick & easy.

libxml2 - Attribute

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">kulimuh</muh>
</test>

example python - script

ctxt = doc.xpathNewContext()
res = ctxt.xpathEval("//test/muh")
for myres in res:
print myres.AttributeCount
File "/usr/lib/python2.2/site-packages/libxml2.py", line 189, in __getattr__
raise AttributeError,attr
AttributeError: AttributeCount

Jul 18 '05 #1
0 2045

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Juergen R. Plasser | last post: by
5 posts views Thread by Rene Olsthoorn | last post: by
1 post views Thread by Victor Ng | last post: by
1 post views Thread by bdecker | last post: by
2 posts views Thread by nickheppleston | last post: by
1 post views Thread by cesar.ortiz | last post: by
2 posts views Thread by jianbing.chen | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.