<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
"Collections" according to Google.<br><br>debug(templateData.brand[0].navigation[0].length);<br><br>4<br><br>I tried that and about 2 dozen other variations.<br>I variously get undefined, 4 or 9.<br><br><br><hr id="stopSpelling">From: Julian.Tenney@nottingham.ac.uk<br>To: xerte@lists.nottingham.ac.uk<br>Date: Fri, 19 Nov 2010 08:37:47 +0000<br>Subject: RE: [Xerte] childNodes count?<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML"><style>
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass p
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass span.ecxEmailStyle18
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass .ecxMsoChpDefault
{font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;}
.ExternalClass div.ecxWordSection1
{page:WordSection1;}

</style><div class="ecxWordSection1"><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);">They are objects (arrays I think), not XML Nodes.</span></p><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);">&nbsp;</span></p><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);">Try </span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';">templateData.brand[0].navigation[0].length; //no childNodes on objects!</span><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);"></span></p><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);">&nbsp;</span></p><div><div style="border-right: medium none; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0cm 0cm;"><p class="ecxMsoNormal" style="margin-left: 36pt;"><b><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';" lang="EN-US">From:</span></b><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';" lang="EN-US"> xerte-bounces@lists.nottingham.ac.uk [mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Dave Burnett<br><b>Sent:</b> 18 November 2010 20:53<br><b>To:</b> Xerte list<br><b>Subject:</b> [Xerte] childNodes count?</span></p></div></div><p class="ecxMsoNormal" style="margin-left: 36pt;">&nbsp;</p><p class="ecxMsoNormal" style="margin-right: 0cm; margin-bottom: 12pt; margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"><br>Here's the structure being read into templateData:<br><br>&lt;brand&gt;<br>&nbsp; &lt;background graphic="intromen_ease.gif" x="0" y="0" w="100" h="200"&gt;<br>&nbsp; &lt;/background&gt;<br>&nbsp; &lt;navigation&gt;<br>&nbsp;&nbsp;&nbsp; &lt;back swf="btnBack_ease.swf" tooltip="Previous page Shortcut-key: Alt+Left" x="100" y="200" w="100" h="200"&gt;&lt;/back&gt;<br>&nbsp;&nbsp;&nbsp; &lt;next swf="btnNext_ease.swf" tooltip="Next page Shortcut-key: Alt+Right" x="200" y="200" w="100" h="200"&gt;&lt;/next&gt;<br>&nbsp;&nbsp;&nbsp; &lt;home swf="btnHome_ease.swf" tooltip="Unit home page Shortcut-key: Alt+Home" x="300" y="200" w="100" h="200"&gt;&lt;/home&gt;<br>&nbsp;&nbsp;&nbsp; &lt;open swf="btnOpen_ease.swf" tooltip="Open a unit Shortcut-key: Ctrl+O" x="400" y="200" w="100" h="200"&gt;&lt;/open&gt;<br>&nbsp;&nbsp;&nbsp; &lt;dict swf="btnDict_ease.swf" tooltip="Show the Dictionary" x="500" y="200" w="100" h="200"&gt;&lt;/dict&gt;<br>&nbsp;&nbsp;&nbsp; &lt;copy swf="btnCopy_ease.swf" tooltip="Copy text to your scrapbook" x="600" y="200" w="100" h="200"&gt;&lt;/copy&gt;<br>&nbsp; &lt;/navigation&gt;<br>&lt;/brand&gt;<br><br><br>inspect(templateData.brand[0].navigation[0])<br><br>gives me 6 children:<br><br>copy : null<br>dict : null<br>open : null<br>home : null<br>next : null<br>back : null<br><br><br>debug(templateData.brand[0].navigation[0].childNodes.length);<br><br>gives me 4<br><br><br>fah.<br><br><br><br></span></p></div><br>

This message and any attachment are intended solely for the addressee and may 
contain confidential information. If you have received this message in error, 
please send it back to me, and immediately delete it.   Please do not use, 
copy or disclose the information contained in this message or in any attachment.  
Any views or opinions expressed by the author of this email do not necessarily 
reflect the views of the University of Nottingham.
<BR>

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
<BR>
<br>_______________________________________________
Xerte mailing list
Xerte@lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.                                               </body>
</html>