Escape double quote character in XML

前端 未结 8 1141
旧时难觅i
旧时难觅i 2020-11-29 07:55

Is there an escape character for a double quote in xml? I want to write a tag like:


but if I put \"

相关标签:
8条回答
  • 2020-11-29 08:31

    If you just need to try something out quickly, here's a quick and dirty solution. Use single quotes for the attribute value:

    <parameter name='Quote = " '>
    
    0 讨论(0)
  • 2020-11-29 08:37

    Here are the common characters which need to be escaped in XML, starting with double quotes:

    1. double quotes (") are escaped to &quot;
    2. ampersand (&) is escaped to &amp;
    3. single quotes (') are escaped to &apos;
    4. less than (<) is escaped to &lt;
    5. greater than (>) is escaped to &gt;
    0 讨论(0)
提交回复
热议问题