create XML file with ASP

Discussion in 'ASP General' started by shank, Sep 1, 2007.

  1. shank

    shank Guest

    I have a stored procedure that creates XML content the way I want it using
    FOR XML AUTO, ELEMENTS. At least when I run the query anyway. What I want is
    to use that SP in an ASP page. When opened, I want a dialog box to pop up
    with the option to open or save as... to the client's HDD. Here's my header
    for the page. The recordset is below that. When I open the page, I get the
    Save As.. I want, but no records are saved.

    What I'm missing is how to deal with XML and the recordset thereof. It's
    more of a feed that a recordset. How do I get that feed into a file on the
    client machine?

    <% Response.contenttype = "application/vnd.xml" %>
    <% Response.AddHeader "Content-Disposition", "filename=Product.xml" %>

    thanks
     
    shank, Sep 1, 2007
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed "shank" <>
    writing in news::

    > I have a stored procedure that creates XML content the way I want it
    > using FOR XML AUTO, ELEMENTS. At least when I run the query anyway.
    > What I want is to use that SP in an ASP page. When opened, I want a
    > dialog box to pop up with the option to open or save as... to the
    > client's HDD. Here's my header for the page. The recordset is below
    > that. When I open the page, I get the Save As.. I want, but no records
    > are saved.
    >
    > What I'm missing is how to deal with XML and the recordset thereof.
    > It's more of a feed that a recordset. How do I get that feed into a
    > file on the client machine?
    >
    ><% Response.contenttype = "application/vnd.xml" %>
    ><% Response.AddHeader "Content-Disposition", "filename=Product.xml" %>
    >
    > thanks
    >
    >
    >


    You are probably using the wrong headers. You should be sending content
    type text/xml .

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Sep 2, 2007
    #2
    1. Advertising

  3. shank

    shank Guest

    "Adrienne Boswell" <> wrote in message
    news:Xns999F8DCB63F14arbpenyahoocom@69.28.186.121...
    > Gazing into my crystal ball I observed "shank" <>
    > writing in news::
    >
    >> I have a stored procedure that creates XML content the way I want it
    >> using FOR XML AUTO, ELEMENTS. At least when I run the query anyway.
    >> What I want is to use that SP in an ASP page. When opened, I want a
    >> dialog box to pop up with the option to open or save as... to the
    >> client's HDD. Here's my header for the page. The recordset is below
    >> that. When I open the page, I get the Save As.. I want, but no records
    >> are saved.
    >>
    >> What I'm missing is how to deal with XML and the recordset thereof.
    >> It's more of a feed that a recordset. How do I get that feed into a
    >> file on the client machine?
    >>
    >><% Response.contenttype = "application/vnd.xml" %>
    >><% Response.AddHeader "Content-Disposition", "filename=Product.xml" %>
    >>
    >> thanks
    >>
    >>
    >>

    >
    > You are probably using the wrong headers. You should be sending content
    > type text/xml .
    >
    > --
    > Adrienne Boswell at Home
    > Arbpen Web Site Design Services
    > http://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
    >======================


    thanks! Good point - But that didn't help.
     
    shank, Sep 2, 2007
    #3
    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. Replies:
    2
    Views:
    592
    Daniel Parker
    Jan 5, 2006
  2. RoyalDutchman
    Replies:
    0
    Views:
    402
    RoyalDutchman
    Dec 17, 2003
  3. jkflens
    Replies:
    2
    Views:
    1,515
    jkflens
    May 30, 2006
  4. Dave
    Replies:
    1
    Views:
    1,010
    Juan T. Llibre
    Jun 8, 2007
  5. Erik Wasser
    Replies:
    5
    Views:
    484
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page