hi im trying to parce a XML that is generated by a php page, the problem is that when i try to get the elements on that XML, the browser says that my variables (dado) are undefined....
any idea how to solve this?
function leValorXML(xmldoc, tag){
var dado = xmldoc.getElementsByTagName(tag);
var valor="";
if (browser.nav){
dado[0].hasChildNodes()===true ? valor=dado[0].firstChild.nodeValue : valor="";
}else{
dado[0].hasChildNodes()===true ?valor=dado[0].childNodes[0].nodeValue : valor="";
}
return valor;
}