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#">

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227240
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to