config.xml:
<?xml version="1.0"
encoding="UTF-8"?>
<configuration>
<appSettings>
<!-- QA
Server-->
<service
url="http://whatsup.ai.com/service/api/" />
<!-- Live
Server-->
<!--service
url="https://user.whatsup.com/service/api/" /-->
<version
versionnumber="1.0.0.0" />
</appSettings>
</configuration>
Code for accessing service url attribute of config file:
var serviceUrl;
function readServiceUrl() {
$.ajax({
url : "config.xml",
dataType : "html",
success : function(xmlResponse) {
serviceUrl = $(xmlResponse).find('service').attr('url');
},
error : function(error) {
console.log(error);
},
async : false
});
}