How can I tell I'm at the end of an array loop based on XPath?
i've gotten xml , xpath (loving it) i'm stumped how can determine if i'm @ end of <cfloop> based on array returned xpath. here's code
<cfloop array="#xmlsearch( application.config, '/environment/app/meta_data/meta_tags/tag[@name]' )#" index="i"> <cfset = xmlparse( )> <cfoutput><meta name="#i.tag.xmlattributes[ 'name' ]#" content="#i.tag.xmlattributes[ 'content' ]#"></cfoutput> <!--- how can tell if i'm on last iteration of loop? ---> </cfloop>
set variable 1 before start loop. increment first command in loop. check see if it's same length of array.
More discussions in ColdFusion
adobe
Comments
Post a Comment