I just took a look at that tag for the first time this morning.. looks very cool.
Wouldn't you want to use the XML2CF action to convert the XML to a CF structure and then just CFLOOP through the first three keys? (well... it is still early here..) > >> support for soXML can be found at http://forums.siteobjects.com > I'll post one more time here and then try to liven up that forum. :grin: > > >> hth, if it doesn't we need to see your code. > Well I wasn't able to get the result I wanted so I will post the example > here. Thanks. > > Here is the XML file called "bristol_night_short.xml" > ===================================================== > <?xml version="1.0" encoding="UTF-8"?> > <tracks> > <track name="Bristol_Night"> > <TrackDescriptor> > <segmentcount>4</segmentcount> > <night>0</night> > </TrackDescriptor> > <TrackDescriptor> > <segmentcount>6</segmentcount> > <night>1</night> > </TrackDescriptor> > <TrackDescriptor> > <segmentcount>8</segmentcount> > <night>0</night> > </TrackDescriptor> > </track> > <track name="Atlanta"> > <TrackDescriptor> > <segmentcount>7</segmentcount> > <night>1</night> > </TrackDescriptor> > <TrackDescriptor> > <segmentcount>9</segmentcount> > <night>0</night> > </TrackDescriptor> > <TrackDescriptor> > <segmentcount>11</segmentcount> > <night>1</night> > </TrackDescriptor> > </track> > </tracks> > ===================================================== > > here is the CF code, this assumes that you are using > soxml. If you are not then just replace the header > with a cfobject create for Microsft.XMLDOM > > ===================================================== > <cf_SOXML > action="XML2DOM" > input="c:\inetpub\wwwroot\n50_parse\bristol_night_short.xml" > output="oDOM" > type="file" > > > <cfoutput> > > <cfset colTrack = oDOM.getElementsByTagName("track")> > <cfloop collection="#colTrack#" item="track"> > <cfset trackName = track.getAttributeNode("name")> > > #trackName.Text#<br> > > <cfset colTrackDescriptor = > oDOM.getElementsByTagName("TrackDescriptor")> > <cfloop collection="#colTrackDescriptor#" item="TD"> > <cfset segmentcount = > TD.selectSingleNode("segmentcount")> > <cfset night = TD.selectSingleNode("night")> > > > >#segmentcount.Text# : #night.Text#<br> > > </cfloop> > > </cfloop> > > </cfoutput> > ===================================================== > > This code return the following > > Bristol_Night > >4 : 0 > >6 : 1 > >8 : 0 > >7 : 1 > >9 : 0 > >11 : 1 > Atlanta > >4 : 0 > >6 : 1 > >8 : 0 > >7 : 1 > >9 : 0 > >11 : 1 > > What I want to see is > > Bristol_Night > >4 : 0 > >6 : 1 > >8 : 0 > Atlanta > >7 : 1 > >9 : 0 > >11 : 1 > > Any help would be greatly appreciated. > Thanks, Fred > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

