Skip to content

Instantly share code, notes, and snippets.

@kdabir
Created March 4, 2014 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdabir/9341818 to your computer and use it in GitHub Desktop.
Save kdabir/9341818 to your computer and use it in GitHub Desktop.
Using Scala xml, the things am learning

checking if a node is pure value of consists of neseted element

scala> (<a x="x">value</a>).child.forall(_.isAtom)
res67: Boolean = true

scala> (<a x="x"><b>value</b></a>).child.forall(_.isAtom)
res68: Boolean = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment