• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

getElementsByTagName Trouble

Guest
Oct 10, 2007 Oct 10, 2007

Copy link to clipboard

Copied

I am somewhat new to coldfusion and am making a script that will read RSS docs and grab all of the item elements without having to worry about which version of RSS the doc is. I am trying to use the getElementsByTagName function to accomplish this.

<cfset items=myXMLDoc.getElementsByTagName("item")>

This is creating a collection object which I am attempting to loop through with

<cfloop collection="#items#" item="thisItem">

What do I need to do to actually output the contents of each item, anything I have tried results in outputting the size of the collection (items[thisItem]).

Any help is appreciated.
TOPICS
Advanced techniques

Views

319

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

which version of CF are you working with?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

LATEST
It is MX7.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation