If the problem is that the array you are looping contains 'undefined'
values, you could try this code to remove them:

<cfscript>
foo = ArrayNew(1);
foo[2] = "";

myArray.RemoveAll(foo);
</cfscript>

Or is it that some 'ProductInformation' elements do not contain all the
expected sub-elements?

Another thing to try is to use XMLSearch to return an array of
'ProductInformation' elements which will simplify the code and perhaps solve
the problem:

<cfset aProducts = XMLSearch(xmlContent,"//ProductInformation");
<cfloop from="1" to="#ArrayLen(aProducts)#" index="i">
<cfoutput>Product link: #aProducts[i].productLink.xmlText#</cfoutput>
</cfloop>

Regards,

Dominic





On 14/11/2007, Dave Watts <[EMAIL PROTECTED]> wrote:
>
> > Question for you: would ArrayIsDefined work
> > when the # of elements in the array are
> > different as I loop through the results? That is
> > the case here, I believe.
>
> I'm not exactly sure what you mean by that, but it should work fine in any
> case.
>
> Dave Watts, CTO, Fig Leaf Software
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293360
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to