Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在SQL中,如何在不使用<;的情况下将属性值中的一个作为XML形成XML输出&燃气轮机;编码的_Sql_Xml - Fatal编程技术网

在SQL中,如何在不使用<;的情况下将属性值中的一个作为XML形成XML输出&燃气轮机;编码的

在SQL中,如何在不使用<;的情况下将属性值中的一个作为XML形成XML输出&燃气轮机;编码的,sql,xml,Sql,Xml,我正在尝试一个查询,该查询返回一个属性值为XML且不编码的XML输出 示例: <Event EventLogId="124018" EventCategoryCode="ABC" EventTypeCode="ERROR" xmlObject="<attributes><attribute>A1</attribute></attributes>" /> <Event EventLogId="124

我正在尝试一个查询,该查询返回一个属性值为XML且不编码的XML输出

示例:

<Event EventLogId="124018" EventCategoryCode="ABC" 
       EventTypeCode="ERROR" 
       xmlObject="<attributes><attribute>A1</attribute></attributes>" />

<Event EventLogId="124019" EventCategoryCode="DEF" 
       EventTypeCode="Warning" 
       xmlObject="<attributes><attribute>A2</attribute></attributes>" />
但是我得到了这个输出

<Event EventLogId="124018" EventCategoryCode="ABC" 
       EventTypeCode="ERROR" 
       xmlObject="&lt;attributes&gt;&lt;attribute&gt;A1&lt;/attribute&gt;&lt;/attributes&gt;" />

<Event EventLogId="124019" EventCategoryCode="DEF" 
       EventTypeCode="Warning" 
       xmlObject="&lt;attributes&gt;&lt;attribute&gt;A2&lt;/attribute&lt;&lt;/attributes&gt;" />

我想用
代替

在属性中或XML中的任何位置具有非转义(即非实体编码)字符是无效的

100%准确地说,在我得到很多评论之前,您可以使用特殊的数据语法,但这在属性中是不合法的。此外,很少看到使用此功能


您可以在这里阅读标准()基本XML标准实际上很短,阅读不到一个小时。

不能这样做——这不是合法的XML。任何XML阅读器都应该能够为您翻译/反实体化它。
<Event EventLogId="124018" EventCategoryCode="ABC" 
       EventTypeCode="ERROR" 
       xmlObject="&lt;attributes&gt;&lt;attribute&gt;A1&lt;/attribute&gt;&lt;/attributes&gt;" />

<Event EventLogId="124019" EventCategoryCode="DEF" 
       EventTypeCode="Warning" 
       xmlObject="&lt;attributes&gt;&lt;attribute&gt;A2&lt;/attribute&lt;&lt;/attributes&gt;" />