I have the following XML
It actually can be simplified as below:
//group/p1[string-length() > 0] => element text is non-empty //group/p1[string-length() = 6] => element text has length 6