I want to get the XML from a web-service using the httpclient, but I don't how, because I want the tag name of the XML parameters
var myurl = 'url'; var aut = { 'token': miToken, }; var xhr = Titanium.Network.createHTTPClient(); xhr.onerror = function(e) { toast = Ti.UI.createNotification({message:"Error " + e.error}); toast.show(); }; xhr.setTimeout(20000); xhr.onload = function(e) { var xmlDoc = e.source; var dataResult = xmlDoc.documentElement.getElementsByTagName('EmpresaEntity'); alert(dataResult.idEmp.length) }; xhr.open('GET',myurl); xhr.setRequestHeader("Content-Type", "application/json"); xhr.setRequestHeader('charset', 'utf-8'); xhr.send(aut);