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:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Help with small XML reader
You can use selectSingleNode(strPattern) to select the first descendant node which matches a certain pattern, like a tag selector.
Javascript code:
var Tasks = XML.selectNodes("/Tasks/Task");
 
for (i=0; i<Tasks.length; i ++) {
    var TaskNode = Tasks[i];
    var NameNode = TaskNode.selectSingleNode("Name");
    Manage.LstView_AddItem("ListViewName", NameNode.text, IntId++);
}

If you need to access lots of child nodes from one task node, you might prefer iterating through the childNodes for each task node iteration.

For a complete overview of all objects, function and properties available in the XML DOM, have a look at DevGuru's reference. You might also want to learn some XPath, the query language of the XML DOM: XPath on W3Schools.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-25-2010 04:03 PM
Profile E-Mail PM Web 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