Re: invalid xml chars returned in select .. for xml auto
From: Michael Rys [MSFT] (mrys_at_online.microsoft.com)
Date: 01/26/05
- Next message: Michael Rys [MSFT]: "Re: XML Buffer, OPENXML Usage Advice"
- Previous message: Michael Rys [MSFT]: "Re: updategram example needed"
- Next in thread: Robbe Morris: "Re: invalid xml chars returned in select .. for xml auto"
- Maybe reply: Robbe Morris: "Re: invalid xml chars returned in select .. for xml auto"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 26 Jan 2005 15:00:15 -0800
Andrew is correct. Assuming that you may have an XML 1.1 parser, FOR XML in
SQL Server 2005 will entitize such invalid characters (note: Neither MSXML
nor System.XML provide an XML 1.1 parser), but an XML 1.0 parser will still
fail. You could also just avoid outputting such characters.
Best regards
Michael
""Andrew Conrad"" <aconrad@microsoft.com> wrote in message
news:Vf$LwawAFHA.768@cpmsftngxa10.phx.gbl...
> This will not work because entities are only allowed for legal characters.
>
> You will either need to base64 or hex encode the field. This can be done
> by casting the field as binary in the For Xml statement.
>
> Andrew Conrad
> Microsoft Corp
> http://blogs.msdn.com/aconrad
>
- Next message: Michael Rys [MSFT]: "Re: XML Buffer, OPENXML Usage Advice"
- Previous message: Michael Rys [MSFT]: "Re: updategram example needed"
- Next in thread: Robbe Morris: "Re: invalid xml chars returned in select .. for xml auto"
- Maybe reply: Robbe Morris: "Re: invalid xml chars returned in select .. for xml auto"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|