Idle pondering from a Scala learner perhaps, but ... in my tinkerings I\'ve written the following:
( n.child.size > 0 ) && ( n.child.filter( ! _.isIns
{ import n.child._ ( size > 0 ) && ( filter( ! _.isInstanceOf[Text] ).size == 0 ) }