public static String getValue ( Element element ) { if ( element != null ) { Node dataNode = element . getFirstChild ( ) ; if ( dataNode != null ) { return ( ( Text ) dataNode ) . getData ( ) ; } } return null ; }
Get the text value for the specified element . If the element is null or the element s body is empty then this method will return null .