My GPathResult can have a name node in one of the 3 ways
1) name node is present and has a value ex: John
2) name node exists, but has no value in it.
3) No name node exists at all.
In Groovy code, how do i differenciate between the above 3 cases using my Gpathresult. Do I use something like gPathResult. value()!=null ?
Pesudo code:
if(name node is present and has a value){
do this
}
if(name node exists, but has no value in it){
do this
}
if( No name node exists at all){
do this
}
GPathResult
but aNode
. Those two behave differently in the scope of this question, as your else path will NEVER be triggered. – Pulliam