Shoutbox

XML Saving and loading? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: XML Saving and loading? (/showthread.php?tid=63740)

XML Saving and loading? by TechedRonan on 07-21-2006 at 06:42 PM

How can i load and save data to an xml file?


RE: XML Saving and loading? by -dt- on 07-21-2006 at 06:47 PM

use the COM object Microsoft.XMLDOM
http://www.devguru.com/technologies/xmldom/quickref/obj_document.html

use the Load method and Save method


RE: XML Saving and loading? by TechedRonan on 07-21-2006 at 06:53 PM

Uh, I'm not really understanding whats on that page... Not sure if i have to download something?

What I want to do is:
Set for example  the value to my nickname.

code:
<Information>
           <name>Value</name>
</Information>


RE: XML Saving and loading? by -dt- on 07-21-2006 at 07:19 PM

script

code:
var xml = new ActiveXObject("Microsoft.XMLDOM");
var file = MsgPlus.ScriptFilesPath + '\\settings.xml';
xml.load(file);
var node = xml.selectSingleNode("/Information/name");
node.text = "test";

xml.save(file);




settings.xml
code:
<Information>
           <name>Value</name>
</Information>


RE: XML Saving and loading? by TechedRonan on 07-21-2006 at 07:32 PM

Yeah thanks it works!
Now how can i get my own nickname from Initialize?


RE: XML Saving and loading? by cloudhunter on 07-21-2006 at 07:51 PM

Your own nickname is stored in "Messenger.MyName" :)

Cloudy


RE: XML Saving and loading? by TechedRonan on 07-21-2006 at 08:30 PM

Yeh thanks

And finaly, how can I upload this on an ftp?