Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Problem viewing compressed(zip) XML in browser(IE)

Thread Tools

Problem viewing compressed(zip) XML in browser(IE)
Posts: n/a
I received a huge compressed-xml file from server and want to display
that in bowser (IE). I believe it's doable by just manipulating
Response object header. The error I get is "xml document must have top
level element". I could open this compressed xml in winzip. So
compressing part looks good. It's well formmed XML so the error realted
to tag is not making sense to me.

Here is my ASP page code>>>>>>...

' this class method takes file ..compresses it and send it back as
binary array(binay[])
' so result variable has content of type binay[]

MyObjectname.GetZippedXml fileName, result
Response.ContentType = "text/xml"
Response.AddHeader "Content-Encoding", "gzip"
Response.BinaryWrite result

When I put content of "result" variable in file and viewed it in
winzip, it showed expected result. It means "result" varaible has valid
compressed xml coming from GetZippedXml method. According to me issue
is somewhere in setting Response object header. Is there any tweak to
work with binarywrite and response object?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing one XML using multiple XSL files Toby Newman XML 13 01-29-2007 10:25 AM
Viewing XML MartinC XML 4 12-13-2006 12:28 AM
Viewing xml as SVG via XSLT directly shaun XML 2 05-18-2006 06:47 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
PC Viewing vs DVD Player Viewing - MP3 play very fast Ray Donzdorf Computer Support 0 12-11-2004 01:07 PM