Oh duh .. why didn't i spot that .. Thanks Chris :-)
-----Original Message----- From: Chris Gottshall [mailto:[EMAIL PROTECTED] Sent: 18 December 2005 16:24 To: CF-Talk Subject: Re: XML Problem Jennifer, You should try printing the XmlText of the node. Ex: xmlcontent.shop.stock.item[i].stockcode.XmlText Stopping at .stockcode returns a reference to the XmlNode, hence the error. But the .stockcode.XmlText contains the value you are looking for. -Chris >Hi, I'm learning xml to use it within a cart application and have come >unstuck. > >The xml file I've created looks fine. I can read it and get a count of >stock items. > >But all of the contents I return look like >[EMAIL PROTECTED] > >Can anyone see where I'm going wrong please? > >Thanks, Jenny > > ><cfscript>URLToPull = "#application.siteurl#stock/stock.xml";</cfscript> > ><cfhttp url="#URLToPull#" method="GET" timeout="15"></cfhttp> > ><cfscript> > XMLContent = trim(cfhttp.filecontent); > XMLContent = XMLParse(XMLContent); ></cfscript> > ><cfset showitems = #ArrayLen(XMLContent.shop.stock.item)#> > ><cfoutput>#showitems#<br> >#xmlcontent.shop.shopname#<br><br> ><cfloop from="1" to="#showitems#" index="i"> >#xmlcontent.shop.stock.item[i].stockcode#<br> ></cfloop> ></cfoutput> > ><cfdump var="#xmlcontent#"> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227243 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

