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:189910
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