nrinaudo on update-sbt-1.6.2
nrinaudo on master
Update sbt to 1.6.2 Merge pull request #141 from nr… (compare)
nrinaudo on update-sbt-1.6.2
Update sbt to 1.6.2 (compare)
nrinaudo on update-kantan.sbt-2.8.2
nrinaudo on master
Update to kantan.sbt 2.8.2 Merge pull request #140 from nr… (compare)
nrinaudo on update-kantan.sbt-2.8.2
Update to kantan.sbt 2.8.2 (compare)
Have just found this, looks great so far. Am a bit stuck with doing fall-back resolutions on case classes, I want to be able to do an orElse
, something like:
case class Example(a: String, b: String)
NodeDecoder.decode(
xp”//a”,
xp”//b”.orElse(xp”//c”)
)(Example.apply)
Is there a neat way to do something like that?
|
is a union operator in XPath - selects these nodes OR those nodes
.orElse(…)
and another query if I wanted
Compiler.xpath1
call was needed - in other places it looks as if it acts as an implicit conversion
In case that someone uses Intellij IDEA: I just added support for kantan.xpath to my plugin called Custom Postfix Templates. It allows you to easily expand
"//my/query".xp
to
xp"//my/query"
by automatically adding the following imports:
import kantan.xpath._
import kantan.xpath.implicits._
Please let me know if I can improve these postfix templates.