<HTML dir=ltr><HEAD><TITLE>Access nextChild from ID?</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText86060 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>just to add - try and be consistent in how you use this stuff, otherwise it can get messy. I tend to:</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>- try and set properties on the xml first, if possible, but not all properties can be set through the xml;</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>- use expressions to get at data in some sort of data provider as I described;</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>- access child icons and loop over those after the xml has parsed to set properties (the icons exist by this point) or do other stuff like draw into them. I think the icons get pushed into the pageIconID.children array? </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>- A decision icon can help keep icons seperate (so you get a clean array of just the icons you are interested in, i.e. just the text icons you duplicated in your example earlier).</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>If you settle on an approach it will be easier later to understand your code,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>J</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk on behalf of Julian Tenney<BR><B>Sent:</B> Mon 05/10/2009 17:18<BR><B>To:</B> Donald.Mackay@beagle.com.au; Xerte discussion list<BR><B>Subject:</B> [Xerte] RE: Access nextChild from ID?<BR></FONT><BR></DIV>
<DIV dir=ltr>
<DIV id=idOWAReplyText73207 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>iconID.XMLElement.nextChild etc</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>XMLElement gives you the xml node associated with the icon,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>J</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Donald.Mackay@beagle.com.au [mailto:Donald.Mackay@beagle.com.au]<BR><B>Sent:</B> Mon 05/10/2009 16:42<BR><B>To:</B> Xerte discussion list<BR><B>Subject:</B> Access nextChild from ID?<BR></FONT><BR></DIV>
<DIV><BR>
<P><FONT size=2>Hi<BR><BR>Thanks everyone for the help and tips its made the adventure much more pleasant.<BR><BR>I have come to another question:<BR>I can access others icons in the tree using:<BR>icon.previousSibling , nextSibling etc but I am wanting to reference from an<BR>icons id eg I would like to access the decision icon with id='targets' children<BR>using targets.childNodes[i] instead of a brittle set of prevs and nexts.<BR><BR>Is this possible? or is there another way to achieve this?<BR><BR>Thanks<BR>Donald<BR><BR><BR><BR></FONT></P></DIV></DIV></BODY></HTML>