1 summary
There are some special characters in both XML and HTML, these special characters cannot be used directly in XML or HTML, if these characters must be used, they should be escaped. Escape characters start with "&" and end with ";".
2 Escape characters commonly used in XML
character |
escape character |
describe |
& |
& |
and |
< |
< |
Less than sign |
> |
> |
greater than sign |
" |
" |
Double quotes |
' |
' |
apostrophe |
3 escape characters commonly used in HTML
character |
escape character |
describe |
& |
& |
and |
< |
< |
Less than sign |
> |
> |
greater than sign |
" |
" |
Double quotes |
|
space |
|
© |
© |
copyright symbol |
® |
® |
Registrar |
4 Escape characters can be expressed in the following unified format
character |
escape character |
describe |
" |
" or " |
Double quotes |
' |
' or ' |
apostrophe |
& |
& or & |
and symbol |
< |
< 或 < |
Less than sign |
> |
> or > |
greater than sign |
@ |
@ |
at symbol |
© |
© or © |
copyright |
® |
® or ® |
Trademark |
™ |
™ |
trademark |
¥ |
¥或 ¥ |
RMB |
  |
space |
|
\t |
	 |
Tab |
\r |

 |
carriage return |
\n |

 |
new line |