[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

<form>
     <input name="some name" />
        ....
        ....
</form>

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.

Thanks



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