The following is a call to amazon.com to return sub-categories - in this case
Baby > Activities.
<cfhttp url="<a target=_blank class=ftalternatingbarlinklarge
href="http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&Subscri
ptionId=02C1DF8AE32GQ219EC02&AssociateTag=intellifit-20&Operation=BrowseNodeLook
up&BrowseNodeId=542460"">http://webservices.amazon.com/onca/xml?Service=AWSEComm
erceService&SubscriptionId=02C1DF8AE32GQ219EC02&AssociateTag=intellifit-20&Opera
tion=BrowseNodeLookup&BrowseNodeId=542460"</a> method="GET" resolveurl="yes"
throwonerror="yes">
<cfset results = XmlParse(cfhttp.FileContent)>
<cfdump var="#results#">
Works properly and the <cfdump ...> return a well formed structure.
Here is where I get stuck : there are some of children that I need to extract
and I am no able to apply various examples of "XmlSearch" or some <cfscript>s
in Macromedia - sorry - Adobe LiveDocs.
Please help a color-by-numbers newbie.
A nice Memorial Day weekEnd everybody.
ContiW
BKBK - 27 May 2006 17:43 GMT
Displaying these dumps in turn might lead you on to something:
<cfdump var="#results.xmlRoot.XmlChildren[1]#">
<cfdump var="#results.xmlRoot.XmlChildren[1].XmlChildren[1]#">
<cfdump var="#results.xmlRoot.XmlChildren[1].XmlChildren[1].XmlChildren[1]#">
xSist - 27 May 2006 18:00 GMT
Good hint. Thank you BKBK!
ContiW
xSist - 27 May 2006 18:49 GMT
DKDK
Following your advice I got
<cfloop from="1"
to="#arrayLen(results.xmlRoot.XmlChildren[2].XmlChildren[2].XmlChildren[3].XmlCh
ildren)#" index="i">
<cfoutput>
#results.xmlRoot.XmlChildren[2].XmlChildren[2].XmlChildren[3].XmlChildren<i>.Xml
Children[2]#
#results.xmlRoot.XmlChildren[2].XmlChildren[2].XmlChildren[3].XmlChildren<i>.Xml
Children[1]#
</cfoutput>
<br>
</cfloop>
to give me exactly what I needed. Thank you.
Nevertheless, i would love to know how you have got the values for each level
of children.