homepage Welcome to WebmasterWorld Guest from 23.22.194.120
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
XML Buffering
From a VERY old post
Mr_Brutal




msg:702179
 5:28 pm on Mar 7, 2005 (gmt 0)

Hello all,

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...)

 

brucec




msg:702180
 6:03 pm on Mar 7, 2005 (gmt 0)

What you using to parse your XML? DOM, SAX, what else?

Mr_Brutal




msg:702181
 9:00 am on Mar 8, 2005 (gmt 0)

Im using the ASP response object to output the XML directly to the browser and sending the location of the XSL file i've created to display the data in a report.

So I think the XML is parsed by Internet Explorer using the the XSL file - does that sound right?

brucec




msg:702182
 12:16 pm on Mar 8, 2005 (gmt 0)

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.

Mr_Brutal




msg:702183
 12:42 pm on Mar 8, 2005 (gmt 0)

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.

Cheers brucec i'll take a look at SAX!

Hester




msg:702184
 12:54 pm on Mar 10, 2005 (gmt 0)

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.

Mr_Brutal




msg:702185
 3:10 pm on Mar 10, 2005 (gmt 0)

Cheers Hester, thats the conclusion that I came to except that I didn't make the connection that it wasn't valid XML so wouldn't parse it. I thought it was just waiting until it all arrived :)

mrMister




msg:702186
 1:47 am on Apr 8, 2005 (gmt 0)

Why can't you do the transformation on the server?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved