Is it possible to use javax.xml.xpath.XPathExpressions with scala.xml.NodeSeqs?
I’d like an API that allows me to express something like:
val xml = ...
val xpath = XPathFactory.newInstance.newXPath.compile(
"""/this/that/theOther[@abc="123"]""")
val selectedNodes: NodeSeq = xml.applyXpath(xpath)
Is it an absolute requirement that its Scala XML and javax.xml.xpath? Or that you’d rather use string based XPaths within Scala.
Scales Xml has added string based XPath usage (as well as the faster internal syntax) but I haven’t yet decided if it makes sense to provide a javax.xml.xpath implementation.
If this is something useful for people I’d consider spending more time on implementing it.