Created
August 14, 2012 10:53
-
-
Save mdread/3348152 to your computer and use it in GitHub Desktop.
Extract all non empty child text nodes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extractNonEmptyTextChilds(n: Node): String = n map { e => e.child.filter({f => f.text.trim() != "" && f.label == "#PCDATA"}) text } mkString |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment