create XML file with ASP
am 02.09.2007 00:03:15 von Shank
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
Re: create XML file with ASP
am 02.09.2007 22:56:23 von Adrienne Boswell
Gazing into my crystal ball I observed "shank"
writing in news:eq13mPO7HHA.5316@TK2MSFTNGP04.phx.gbl:
> 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
Re: create XML file with ASP
am 02.09.2007 23:58:40 von Shank
"Adrienne Boswell" wrote in message
news:Xns999F8DCB63F14arbpenyahoocom@69.28.186.121...
> Gazing into my crystal ball I observed "shank"
> writing in news:eq13mPO7HHA.5316@TK2MSFTNGP04.phx.gbl:
>
>> 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.