1var xmlHttp = createXmlHttpRequestObject(); 2 3function createXmlHttpRequestObject() 4{ 5 var xmlHttp; 6 try 7 { 8 xmlHttp = new XMLHttpRequest(); 9 } 10 catch(e) 11 { 12 var XmlHttpVersions = new Array("MSXML2.XMLHTTP.6.0", 13 "MSXML2.XMLHTTP.5.0", 14 "MSXML2.XMLHTTP.4.0", 15 "MSXML2.XMLHTTP.3.0", 16 "MSXML2.XMLHTTP", 17 "Microsoft.XMLHTTP"); 18 for (var i=0; i<XmlHttpVersions.length && !xmlHttp; i++) 19 { 20 try 21 { 22 xmlHttp = new ActiveXObject(XmlHttpVersions[i]); 23 } 24 catch (e) {} 25 } 26 } 27 if (!xmlHttp){ 28 //alert("Error creating the XMLHttpRequest object."); 29 } else { 30 return xmlHttp; 31 } 32} 33 34function handleRequestStateChange() 35{ 36 if (xmlHttp.readyState == 4) 37 { 38 if (xmlHttp.status == 200) 39 { 40 try 41 { 42 handleServerResponse(); 43 } 44 catch(e) 45 { 46 alert("Error reading the response: " + e.toString()); 47 } 48 } 49 else 50 { 51 alert("There was a problem retrieving the data:\n" + 52 xmlHttp.statusText); 53 } 54 } 55} 56 57function handleServerResponse() 58{ 59 var xmlResponse = xmlHttp.responseXML; 60 if (!xmlResponse || !xmlResponse.documentElement) 61 throw("Invalid XML structure (1):\n" + xmlHttp.responseText); 62 var rootNodeName = xmlResponse.documentElement.nodeName; 63 if (rootNodeName == "parsererror") 64 throw("Invalid XML structure (2):\n" + xmlHttp.responseText); 65 xmlRoot = xmlResponse.documentElement; 66 67 if (rootNodeName != "response" || !xmlRoot.firstChild) 68 throw("Invalid XML structure (3):\n" + xmlHttp.responseText); 69 70 responseText = xmlRoot.firstChild.data; 71 72 if(responseText == undefined){ 73 myDiv.innerHTML = xmlHttp.responseText; 74 } else { 75 myDiv.innerHTML = responseText; 76 } 77 78}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.