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

Discussion in 'ASP General' started by ms.coding@gmail.com, Aug 25, 2006.

  1. Guest

    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?
     
    , Aug 25, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ad
    Replies:
    6
    Views:
    3,221
  2. Alex Hunsley
    Replies:
    1
    Views:
    601
    Andrew Thompson
    Sep 16, 2004
  3. Replies:
    0
    Views:
    1,725
  4. flebber
    Replies:
    9
    Views:
    523
    John Machin
    Jun 10, 2007
  5. Dirk Meier
    Replies:
    0
    Views:
    103
    Dirk Meier
    Nov 9, 2004
Loading...

Share This Page