What\'s the simplest API to use in scala to perform the following XPath queries on a document?
//s:Annotation[@type=\'attitude\']/s:Content/s:Parameter[@role
I would suggest using kantan.xpath:
import kantan.xpath._ import kantan.xpath.implicits._ input.evalXPath[List[String]](xp"/annotation[@type='attitude']/content/parameter[@role='type' and not(text())]/@value")
This yields:
res1: kantan.xpath.XPathResult[List[String]] = Success(List(foobar))