I'm currently parsing a number of xml files. In attempt to speed up processing
I'm running each file in its own parse thread (may be relevant, I'm not sure).
Inside of each I have a loop that is causing the error
"java.lang.IndexOutOfBoundsException".
----------------------------------------------------
<cfif StructKeyExists(stcXML.country,"cities")>
<cfloop index="i" from="1"
to="#ArrayLen(stcXml.country.cities.xmlChildren)#">
<cfset CityData = stcXml.country.cities.xmlChildren[i] />
<cfsavecontent variable="STUFF">'#CityData.url.xmlText#'</cfsavecontent>
<cfset writeToFile(STUFF) />
</cfloop>
</cfif>
---------------------------------------------------
The line that the log file says is the problem is:
<cfset CityData = stcXml.country.cities.xmlChildren[i] />
How can that statement with 'i' be throwing a
java.lang.IndexOutOfBoundsException when I just set 'i' to increment from 1 to
the length of xmlChildren?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327508
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4