Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   libxml2 - Attribute (http://www.velocityreviews.com/forums/t319539-libxml2-attribute.html)

Richard Mertens 07-11-2003 08:00 AM

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



All times are GMT. The time now is 10:53 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.