1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
xhr.onload = function() {
   var xmlDoc = Ti.XML.parseString(this.responseText).documentElement;
   var xlinestatus = xmlDoc.getElementsByTagName('LineStatus');
   var xlinestatus2 = xmlDoc.getElementsByTagName('LineStatus').item(0).getAttribute("StatusDetails");
   Ti.API.info(" Status: " + xlinestatus2);

   for (i = 0; i < xlinestatus.length; i++) {
     var theItem = xlinestatus.item(i);
     var newname = theItem.getElementsByTagName("Line").item(0).getAttribute("Name");
     var newstatus = theItem.getAttribute("StatusDetails");
     var desc = theItem.getElementsByTagName("Status").item(0).getAttribute("Description");
     var active = theItem.getElementsByTagName("Status").item(0).getAttribute("IsActive");
     Ti.API.info(" Line: " + newname + " Desc: " + desc + ", Active: " + active);
   Ti.API.info(" Status: " + newstatus);
   }

};