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