直接看表,描述很清晰
字符 |
轉義字符 |
備注 |
---|---|---|
& (ampersand) |
& |
這個沒什么特別的,幾乎所有的地方都需要使用轉義字符 |
> (greater-than character) |
> |
在屬性(Attribute values)中必須進行轉義,在內容(Content)中 如果沒有<在>符號的前面,可以不進行轉義,直接使用> |
< (less-than character) |
< |
在屬性(Attribute values)中必須進行轉義,在內容(Content)中 如果沒有>在<符號的后面,可以不進行轉義,直接使用< |
" (straight quotation mark) |
" |
在屬性(Attribute Values)中必須進行轉義,在內容(Content)中可以直接使用,而不進行轉義。需要注意的是如果屬性使用'來定義屬性,那么"可以直接使用如 Text='test"test"test',反之如果是用”來定義屬性,那么'可以直接使用而不需要轉義字符,如Text="test'test" |
' (single straight quotation mark) |
' |
同上 |
(numeric character mappings) |
&#[integer]; or &#x[hex]; |
可以和字符集合映射,如d(10進制)或者ÿ(16進制) 回車:
換行:
Tab:	空格:  |
(nonbreaking space) |
  (assuming UTF-8 encoding) |
Flow Document的元素或者有Text屬性的元素,輸出不間斷空格 |
{ |
{}{ |
當{}使用的時候,{可以直接使用(功能類似與string text=@"E:\test.txt";中的@) |