Because the data is very very messy and contains lots of repeated data that needs getting rid of so I can give an accurate value of the number of results.
On Tue, 11 Jan 2005 08:04:05 -0800, Ian Skinner <[EMAIL PROTECTED]> wrote: > My first question is what is the requirement to parse the XML into a query? > Why not just reference the XML object directly? > > -------------- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > ...-----Original Message----- > ...From: Andrew Dixon [mailto:[EMAIL PROTECTED] > ...Sent: Tuesday, January 11, 2005 7:59 AM > ...To: CF-Talk > ...Subject: Using XML > ... > ...Hi Everyone. > ... > ...We have a busy website that uses a third party XML feed. Basically > ...what happens is: > ... > ...1) The visitor completes a form specifying their criteria. > ...2) A request is sent to the third party for results matching the > ...criteria. > ...3) The third party response with and XML results feed. > ... > ...The returned XML contains many elements with elements within them that > ...also contain multiple sub elements and one of the sub elements also > ...contains multiple sub elements. For example: > ... > ...<data> > ... <elements> > ... <element> > ... <value1>1</value1> > ... <value2>2</value2> > ... <subelements> > ... <subelement> > ... <value1>4</value1> > ... <value2>4</value2> > ... </subelement> > ... <subelement> > ... <value1>4</value1> > ... <value2>4</value2> > ... <subelement> > ... </subelements> > ... <anothersubelements> > ... <anothersubelement> > ... <value1>4</value1> > ... <value2>4</value2> > ... </anothersubelement> > ... <anothersubelement> > ... <value1>4</value1> > ... <value2>4</value2> > ... <anothersubelement> > ... </anothersubelements> > ... <element> > ... <element> > ... <value1>1</value1> > ... <value2>2</value2> > ... <element> > ... </elements> > ...</data> > ... > ...Personally I think the XML format is messy, but that is out of my > ...control. At the moment to parse the data into a query so I can create > ...a results page from I'm doing CFLOOP's within CFLOOP's starting by > ...looping over each 'element' inside the 'elements' structure and then > ...working inwards to the 'subelements' and 'anothersubelements' and also > ...the 'subsubelements' (not show above). > ... > ...Is this the only way to do this, or is there a better way? This way is > ...very slow during busy times, but during quite times this is ok. Also > ...this way is also affected but the number of returned results. The more > ...results the more loops and therefore the longer it takes. > ... > ...Thanks in advanced. > ... > ...Andrew. > ... > ... > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:189914 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