In this very old thread [webmasterworld.com...] Xoc mentions in message 4 that he is buffering all the content and then flushing it when the page is complete, but that he may change this in the future. Well its been 4 years and i'd like to know if anyone has managed this!
I have an ASP page that produces XML and returns this to the client along with an XSL file to transform the data into something a that looks a little nicer. My problem comes from the long load times that occur when the database calls get heavy.
I'd like to send out the XML data node after node using Response.Flush. However I think because im using IE (im developing for an Intranet) and its automatic transformation that this isn't going to work. It still waits for ages before anything appears in the client browser.
Any ideas would be appreciated? (Even if its telling me it can't be done, because im doing this in XML I can't use any other buffering tricks to get progress bars etc...)
I don't think the XSL is causing your ASP page to load slowly. XSL is pretty fast since it is XML itself.
My guess is that you have your Response.Flush in your loop. That is of course a guess since I have not seen your ASP code. I can only assume from your comments that your response.flush method is looping.
Here's a solution: If your XML gets displayed node by node from top to bottom, then you could try SAX (Simple API for XML) to display the XML in your ASP.
Yeah, its the database queries that are talking along time not the XML. I was hoping to find a way to send the XML node after node to IE which is using an XSL file immediately to format the data. I think the problem is that it won't style it until the XML has been fully sent so I get a long waiting time.
This is a problem with XML - until the whole file is received, it's not valid, so can't be parsed! The only solution lies in sending it in valid chunks, or waiting for a parser that can repair broken XML on the fly. (Hmm.) Unless anyone else knows of a solution.