\", \"<\" and single quotes. How do I avoid breaking the xml parser?" />
开发者

SQL Server XQuery: How to avoid "illegal qualified name character" exception?

开发者 https://www.devze.com 2023-02-09 10:47 出处:网络
I\'m working on a XQuery that may/can contain characters like \">\", \"<\" and single quotes. How do I avoid breaking the xml parser?

I'm working on a XQuery that may/can contain characters like ">", "<" and single quotes.

How do I avoid breaking the xml parser?

My xml form is like this

<root>
<container>
  <item>(d开发者_如何学C.Field <> 0)</item>
</container>
</root>


The "XML" you've shown isn't XML.

Either of the following would be XML:

<root>
<container>
  <item>(d.Field &lt;&gt; 0)</item>
</container>
</root>

or:

<root>
<container>
  <item><![CDATA[(d.Field <> 0)]]></item>
</container>
</root>
0

精彩评论

暂无评论...
验证码 换一张
取 消