How do I escape double quotes in attributes in an XML String in T-SQL?

后端 未结 4 587
予麋鹿
予麋鹿 2020-12-23 13:17

Pretty simple question - I have an attribute that I would like to have double quotes in. How do I escape them? I\'ve tried

  • \\\"
  • \"\"
  • \\\\\"
4条回答
  •  别那么骄傲
    2020-12-23 13:32

    In Jelly.core to test a literal string one would use:

    <core:when test="${ name == 'ABC' }"> 
    

    But if I have to check for string "Toy's R Us":

    <core:when test="${ name == &quot;Toy's R Us&quot; }">
    

    It would be like this, if the double quotes were allowed inside:

    <core:when test="${ name == "Toy's R Us" }"> 
    

提交回复
热议问题