Closed SuperKenVery closed 6 months ago
For example,
document:
<input name="hi" id="in"></input>
I hope
//*[@id="in"]//@name
to return a Vec containing hi, but in fact it returns an empty Vec.
Vec
hi
This syntax works in python lxml, so I guess it's a problem with this library?
lxml
Yes, attribute selection with XPath has not yet been implemented, but it is on my todo list.
In the meantime you can just get the node with XPath and use the library to retrieve the attributes. See the docs here.
For example,
document:
I hope
to return a
Vec
containinghi
, but in fact it returns an emptyVec
.This syntax works in python
lxml
, so I guess it's a problem with this library?