Problem viewing compressed(zip) XML in browser(IE)

M

ms.coding

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.Clear
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top