> <CFSET FAQList = xmlobj.irxml.FAQS.FAQ> Your code is pulling only the first array of FAQ..elements.
> <IRXML CorpMasterID="132066"> > <FAQS PubDate="20020506" PubTime="12:50:56"> > <FAQ ID="9999" DLU="20010824 10:16:00"> <cfset faqObjs = xmlObj.IRXML.FAQS /> Will give you all the Faq's , then iterate through "faqObjs" to dump your data or whatever. Joe Eugene > -----Original Message----- > From: Shawn Contreras [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 01, 2003 1:05 PM > To: CF-Talk > Subject: CFLOOP and XML not working! > > > Hello, > > I know that I am close but for some reason I cannot get the CFLOOP to work > with this XML document. I am only getting 1 items listed in this XML > document when I know that there are at least 8. Here is the XML > definition > and layout: > > IRXML - This is the root element of the XML file. > FAQS - Child element of IRXML. Contains one to many FAQ elements. > FAQ - Child element of FAQS with 0 to many occurrences. > ID - Numeric Attribute of FAQ. The unique identifier of the question and > answer pair. > DLU - Numeric date attribute of FAQ. Date the question and > answer pair was > last updated. > Question - Child of FAQ. The value of this element is the text > articulating > the frequently asked question. <![CDATA[Question�s text]]> > Answer - Child of FAQ. The value of this element is the text articulating > the corresponding, frequently asked question�s answer. <![CDATA[Answer�s > text]]> > > > <IRXML CorpMasterID="132066"> > <FAQS PubDate="20020506" PubTime="12:50:56"> > <FAQ ID="9999" DLU="20010824 10:16:00"> > <Question> > <![CDATA[ Can I buy or sell stock through CompanyX? ]]> > </Question> > <Answer> > <![CDATA[ Steelcase does not currently have a plan in place > to sell stock directly to the public. From time to time Steelcase reviews > various plans for direct stock purchase. If a decision is made to launch > such a program, shareholders will be notified and information would be > included on this web site. ]]> > </Answer> > </FAQ> > <FAQ ID="9998" DLU="20010824 10:17:00"> > <Question> > <![CDATA[ When was CompanyX�s initial public > offering and at > what price was its stock offered? ]]> > </Question> > <Answer> > <![CDATA[ February 17, 1998 and stock was offered > at $28.00 > per share. ]]> > </Answer> > </FAQ> > </FAQS> > </IRXML> > > > My Code: > <CFSET xmlobj = xmlParse(cfhttp.fileContent, false)> > <CFSET FAQS = xmlobj.irxml> > <CFSET FAQList = xmlobj.irxml.FAQS.FAQ> > <CFSET Ques = FAQList.Question.xmltext> > <CFSET Ans = FAQList.Answer.xmltext> > <CFSET PRList = ArrayLen(FAQList.xmlChildren)> > <CFOUTPUT> > <div align="center">Number of FAQs: <font > color="##FF0000"><strong>#PRList#</strong></font></div> > <br> > <CFLOOP from="1" to="#ArrayLen(FAQList.xmlChildren)#" index="i"> > <table width="100%" border="0" cellspacing="0" cellpadding="0"> > <tr> > <td width="25"></td> > <td>#FAQList[i].xmlAttributes["ID"]# > <br> > <strong>#Ques#</strong></td> > <td> </td> > </tr> > <tr> > <td width="25"></td> > <td><div align="left">#Ans#</div></td> > <td width="35"> </td> > </tr> > <tr> > <td> </td> > <td> </td> > <td> </td> > </tr> > <tr> > <td bgcolor="##000099"></td> > <td bgcolor="##000099"></td> > <td height="1"></td> > </tr> > <tr> > <td> </td> > <td> </td> > <td height="12"> </td> > </tr> > </table> > </cfloop> > </CFOUTPUT> > > Thank you in advance for any assistance. > > B. Regards, > > Shawn Contreras > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

