【发布时间】:2012-06-08 04:30:51
【问题描述】:
当我编写查询以生成 xml 标签时,我想在我的 sql 查询中保留 html 标签。 例如:
select '<p> this is a code</p>' as code
from table name
for xml path (''), type
输出:
<code><p> this is a code </p> <code>
它应该输出什么:
<code><p> this is a code </p><code>
我该如何解决这个问题?谢谢!
【问题讨论】:
-
我相信对于 XML Explicit。 stackoverflow.com/questions/1947884/…
标签: html sql xml sql-server-2008 sql-server-2005