What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Help with small XML reader

Help with small XML reader
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Help with small XML reader
Here is some source code that we use in Screenshot Sender. If it doesn't make sense let me know.

js code:
function EnumControls(File, pPlusWnd) {
    _debug.getfuncname(arguments);
    // Load the XML from the specified file
    var XML = new ActiveXObject('MSXML.DOMDocument');
    XML.load(File);
    // Loop through all of the controls
    var Controls = XML.selectNodes('/Interfaces/Window[@Id=\'' + pPlusWnd.WindowId + '\']/Controls/Control');
    for (i=0; i<Controls.length; i ++) {
        var Id = Controls[i].getAttribute('Id');
        var Type = Controls[i].getAttribute('xsi:type');
        // Controls starting with _ are options but not stired in the registry (ie Debug info is in the ScriptInfo.xml)
        if (Id.charAt(0) !== '_') {
            // Get the value depending on the control's type
            objControls[Id] = {};
            objControls[Id].XsiType = Type;
            objControls[Id].Value = pPlusWnd_GetControlvalue(pPlusWnd, Id, Type);
        }
    }
}
05-25-2010 11:35 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help with small XML reader - by chrisctx on 05-25-2010 at 05:36 AM
RE: Help with small XML reader - by matty on 05-25-2010 at 11:35 AM
RE: Help with small XML reader - by chrisctx on 05-25-2010 at 03:39 PM
RE: Help with small XML reader - by Matti on 05-25-2010 at 04:03 PM
RE: Help with small XML reader - by chrisctx on 05-25-2010 at 06:07 PM
RE: Help with small XML reader - by Matti on 05-25-2010 at 06:25 PM
RE: Help with small XML reader - by chrisctx on 05-26-2010 at 01:10 AM
RE: Help with small XML reader - by Matti on 05-26-2010 at 11:31 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On