I am driving myself insane trying to get this to output and I can't seem to find much on the internet that is helpful. Sometimes there is 1 category and sometimes there could be 2.
<Heading>Study: Ban on cell phone use hasn't reduced accident rate</Heading>
<Contents>Content regarding cell phone use.</Contents>
<Category ID="438024898">General Auto News</Category>
I set myitems with the xml search and can manage to output everything below perfectly, except for the multiple categories.
<cfloop from="1" to="#arrayLen(myItems)#" index="i">
#myItems[i].Categories.Category.xmltext# this outputs only the first one, but I can not seem to get the second.
Thanks for any help in advance!!!!
<cfloop from="1" to="#arrayLen(myItems[i].Categories.Category#" index="c" #myItems[i].Categories.Category[c].xmltext# </cfloop>
Category is just a nested array just like your myItems was.
Or you could do another xmlSearch if you prefer.