Re: XML Heck

Tech-Archive recommends: Fix windows errors by optimizing your registry



If the text field is legal XML,

select convert(xml, text-col) from table for xml ...

"KMouse" <kittinmouse@xxxxxxxxx> wrote in message
news:1187392347.795987.131390@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I've got a stored procedure that includes a SELECT statement with FOR
XML AUTO, ELEMENTS, ROOT['Listings']

The data in one of the table elements contains things like
&lt;ul&gt&lt;li&gt;Hello World&lt;/li&gt&lt;/ul&gt;.

What's spit out by the stored procedure is
&amp;lt;ul&amp;gt&amp;lt;li&amp;gt;Hello World&amp;lt;/
li&amp;gt&amp;lt;/ul&amp;gt;

How in the world can I get MSSQL Server 2005 to stop doing that?



.