It is very laborious to ask for the existance of a node, if the logic must be able to deal with the missing value:
xml'find_node("missing/node")'value$
As mid($$,4,5) doesn't throw an error 47, I would prefer to get an empty string in this case, too.