I would like to separate this data with ajax
, but I am having difficulty with nodes
:
<?xml version="1.0" encoding="ISO-8859-1"?>
<android_ecs.xml>
<node><IAAUTNUM>2089777</IAAUTNUM></node>
<node><IAAUTNUM>2089777</IAAUTNUM></node>
<node><IAESTORNO>ESTORNADA</IAESTORNO></node>
<node><IAENTNOME>ETD052 ENTIDADE</IAENTNOME></node>
<node><IAASSNOME>TESTES -TEF</IAASSNOME></node>
<node><IAASSPORT>TESTES -TEF</IAASSPORT></node>
<node><IACARTFMT>6298 6901 0001 6680</IACARTFMT></node>
<node><IAPARPRIM>2,33</IAPARPRIM></node>
<node><IAPARCOUT>0,00</IAPARCOUT></node>
<node><IAQTDPAR>1</IAQTDPAR></node>
<node><IAVALOPE>2,33</IAVALOPE></node>
<node><IACODSESAT></IACODSESAT></node>
<node><IANOMMES>JULHO/14</IANOMMES></node>
<node><IADATA>14/07/2014</IADATA></node>
<node><IAHORA>18:39:57</IAHORA></node>
</android_ecs.xml>
<script>
function dados(){
var ajax = false;
var xml = '';
if(window.XMLHttpRequest){
ajax = new XMLHttpRequest;
}else if(window.ActiveXObject){
ajax = new ActiveXObject("Microsoft.XMLHTTP");
}
//ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
if(ajax){
ajax.open("GET","http://remote.tecbiz.com.br:8080/tecbiz/tecbiz.php? a=725d5b&ecs=5054&sen=123456&aut=&acs=3",true);
ajax.onreadystatechange = function(){
if(ajax.readyState == 4){
if(ajax.status == 200){
xml = ajax.responseText;
android = xml.getElementsByTagName( "android_ecs.xml" )[0];
NUMAUT = android.childNodes[0].childNodes[1].nodeValue;
alert(NUMAUT);
}else{
alert('Erro!');
}
}
}
}
ajax.send(null);
}
</script>
p>