There are quite a few mistakes there. Heres the working code.
Code in js file
code:
function OnEvent_Initialize(MessengerStart)
{
var Sec1 = 0;
var Min1 = 0;
var Hrs1 = 0;
var Days1 = 0;
var Weeks1 = 0;
var xml = new ActiveXObject("Microsoft.XMLDOM");
var file = MsgPlus.ScriptFilesPath + '\\config.xml';
xml.load(file);
Sec1 = xml.documentElement.selectSingleNode("Sec/name");
Min1 = xml.documentElement.selectSingleNode("Min/name");
Hrs1 = xml.documentElement.selectSingleNode("Hrs/name");
Days1 = xml.documentElement.selectSingleNode("Days/name");
Weeks1 = xml.documentElement.selectSingleNode("Weeks/name");
Debug.Trace("Sec----" + Sec1.text);
Debug.Trace("Min----" + Min1.text);
Debug.Trace("Hrs----" + Hrs1.text);
Debug.Trace("Days----" + Days1.text);
Debug.Trace("Weeks----" + Weeks1.text);
}
config.xml
code:
<?xml version="1.0" encoding="iso-8859-1" ?>
<Time>
<Sec>
<name>0</name>
</Sec>
<Min>
<name>0</name>
</Min>
<Hrs>
<name>0</name>
</Hrs>
<Days>
<name>0</name>
</Days>
<Weeks>
<name>0</name>
</Weeks>
</Time>