Escape double quote character in XML

前端 未结 8 1285
旧时难觅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:30

    You can try using the a backslash followed by a "u" and then the unicode value for the character, for example the unicode value of the double quote is

    " -> U+0022

    Therefore if you were setting it as part of text in XML in android it would look something like this,

    
    

    This would produce a text in the TextView roughly something like this

    " Showing double quotes "

    You can find unicode of most symbols and characters here www.unicode-table.com/en

提交回复
热议问题