DaAniv
Junior Member
Posts: 19
31 / /
Joined: Jan 2009
|
O.P. RE: [HELP]weird xml problem
JavaScript code: function OnEvent_Initialize(MessengerStart)
{
xml=new ActiveXObject("Microsoft.XMLDOM");
xml.async=true;
xmlFile=MsgPlus.ScriptFilesPath + "\\Settings.xml";
xml.load(xmlFile);
USSD=new ActiveXObject("Microsoft.XMLDOM");
USSD.async=true;
USSFile=MsgPlus.ScriptFilesPath + "\\UserSentences.xml";
USSD.load(USSFile);
USS=USSD.getElementsByTagName("UserSentences")[0]
GetColor()
}
this is the xml.js
JavaScript code: function saveSentences(SScommand,SSentence)
{
US=USSD.createElement("UserSentence")
SC=USSD.createElement("command")
SSC=USSD.createTextNode(SScommand)
SS=USSD.createElement("sentence")
SSS=USSD.createTextNode(SSentence)
USS.appendChild(US)
US.appendChild(SC)
SC.appendChild(SSC)
US.appendChild(SS)
SS.appendChild(SSS)
USSD.save(USSFile)
}
function GetUserSentences()
{
children=USS.getElementsByTagName("UserSentence").length
for(i=0;i<=children;i++)
{
var name=USS.getElementsByTagName("UserSentence")[i].childNodes[0].text;
Debug.Trace(name)
commands+='<Command>';
commands+='<Name>'+name+'</Name>';
commands+='</Command>';
}
}
This post was edited on 01-26-2009 at 04:32 PM by DaAniv.
|
|