| McGeeky 2005-07-13, 3:23 am |
| This query shows the problem:
select
1 as tag,
null as parent,
'£' as 'Root!1!Pound',
'<' as 'Root!1!LessThan'
for
xml explicit
Results in the following which is invalid XML:
<Root Pound="£" LessThan="<"/>
The less than gets converted correctly but the pound sign doesn't. It should
come out as this
<Root Pound="£" LessThan="<"/>
--
McGeeky
http://mcgeeky.blogspot.com
"McGeeky" <anon@anon.com> wrote in message
news:%23MdxCE4hFHA.320@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> I am creating xml using for xml explicit. Some of the data contains the
> British pound sign £. When later processing the xml I get errors about an
> invalid character in the xml - its the pound sign. Why does for xml
> explicit not escape it like it has done with other illegal characters?
> What is the best way to deal with the pound signs?
>
> Thanks
>
> --
> McGeeky
> http://mcgeeky.blogspot.com
>
>
>
|