I am trying to load xml file asynchronously but when i call LoadXML(docname) in TestConfiguration() and print the return value , it does not print anything.
function TestConfiguration()
{
var strFilePath = "..\\CommonFiles\\TestConfig.xml";
var retVal = LoadXML(strFilePath);
Log.Message(retVal);
}
function LoadXML(docname)
{
try {
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
catch(e) {
Log.Message(e.message);
}
try {
xmlDoc.async=true;
xmlDoc.load(docname);
return(xmlDoc);
}
catch(e) {
Log.Message(e.message);
}
return(null);
}