<commit_before>/*global cordova, module*/
 function httpGet(url) {
    var xmlHttp = null;
    xmlHttp = new XMLHttpRequest();
    xmlHttp.open("GET",url,false);
    xmlHttp.send(null);
    return xmlHttp.responseText;
}
function getConfig(devices, callback){ 
    for (var i = 0; i < devices.length; i++) {
        devices[i].config = httpGet(devices[i].LOCATION);
        devices[i].url = "http://"+devices[i].LOCATION.split("/")[2];
    }
    callback(devices);
}
module.exports = {
    getNetworkServices: function (service, addConfigXML, successCallback, errorCallback) {
    	var processResponse = function (data) {
    		if(addConfigXML) {
    			getConfig(data, function(devices){
    				successCallback(devices);
    			});
	    	} else {
	    		successCallback(data);
	    	}
    	};
        cordova.exec(processResponse, errorCallback, "serviceDiscovery", "getNetworkServices", [service]);
    }
};<commit_msg>removed get xml option - Now handled in Native code<commit_after>/*global cordova, module*/
module.exports = {
    getNetworkServices: function (service, addConfigXML, successCallback, errorCallback) {
    	var processResponse = function (data) {
	    	successCallback(data);
	    }
    	};
        cordova.exec(processResponse, errorCallback, "serviceDiscovery", "getNetworkServices", [service]);
    }
};
{'fraction_non_alphanumeric': 0.13704819277108435, 'fraction_numerical': 0.0015060240963855422, 'mean_word_length': 3.520408163265306, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '778122', 'n_tokens_mistral': 407, 'n_tokens_neox': 396, 'n_words': 80}