I saw the following example on Nabble, where the goal was to return all nodes that contain an attribute with an id of X that contains a value Y:
//find all nodes
Code snippet in the question doesn't working with Scala 2.8 - due to this comparasion
(_ == value)
Needs to be replaced with (_.text == value)
or (_ == Text(value))
or change type of value from String to Text.
And in Daniel's answer (_.value == value)
needs to be replaced with (_.value.text == value)
.