The Prototype Try.these function tries each function supplied in the argument list until one of them works.
Try.these( function1, function2, [...], functionN );
function getXmlNodeValue(xmlNode){
return Try.these(
function() {return xmlNode.text;},
function() {return xmlNode.textContent;}
);
}