Friday, March 9, 2012

FOR XML EXPLICIT and XML HEADER

I have a FOR XML EXPLICIT
statement that is working correctly in every way except for the VERSION
header at the very top.
<?xml version="1.0" encoding="utf-8"?>
Is there anyway to get SQL Server to put this into the returned results?
Thank you
ChrisSince version 1.0 is the default and the encoding is implied by the
resulting codepage, FOR XML itself does not add any of that. You however
should be able to set the encoding through the client-side API (such as the
ADO command stream object).
Best regards
Michael
"Chris Alm" <none@.none.com> wrote in message
news:%23SiV0W3aFHA.2180@.TK2MSFTNGP12.phx.gbl...
>I have a FOR XML EXPLICIT
> statement that is working correctly in every way except for the VERSION
> header at the very top.
> <?xml version="1.0" encoding="utf-8"?>
> Is there anyway to get SQL Server to put this into the returned results?
> Thank you
> Chris
>

No comments:

Post a Comment