Skip to content

acruise/sjaxen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sjaxen

Use Jaxen to navigate Scala object trees

This originally came from the Scala Ur-Wiki at sygneca.com; I got it from the new Scala wiki.

Unfortunately no license was attached. I've asked @rossjudson to clarify. :)

This is what it lets you do:

class Zinger(val lst: List[String]) {
  val name = "Ross"
}
case class Both(name: String, left: Zinger, right: Zinger)

val b = Both("Ross", new Zinger(List("Hello", "World")), new Zinger(List("Bottom", "Ladder")))
val xp = ProductNavigator.parseXPath("left/lst|left/../right[@name='Ross']/lst")
println(xp evaluate b)

>> [Hello, World, Bottom, Ladder]

About

Use Jaxen to navigate Scala object trees

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages