[xml] newbie: Python: attribute value from XPath

How do you get an attribute value from an xmlNode that you get from a 
resulting XPath result set?

e.g. xpath =  //form/input

     <input name="some name" />

This gives me several "input" nodes as a result set, but I want to get the 
value of the name attribute.

I can't seem to find anything in the Python libxml2.py to give me this value.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]