当前位置: 移动技术网 > IT编程>网页制作>CSS > How to use special characters in XML?

How to use special characters in XML?

2019年11月23日  | 移动技术网IT编程  | 我要评论

https://dvteclipse.com/documentation/svlinter/how_to_use_special_characters_in_xml.3f.html

 

because xml syntax uses some characters for tags and attributes it is not possible to directly use those characters inside xml tags or attribute values.

to include special characters inside xml files you must use the numeric character reference instead of that character. the numeric character reference must be utf-8 because the supported encoding for xml files is defined in the prolog as encoding="utf-8" and should not be changed.

the numeric character reference uses the format:

&#nn; decimal form

&#xhh; hexadecimal form

code name displayed as
	 horizontal tab non-printing

 line feed non-printing

 carriage return non-printing
  space non-printing
! exclamation mark !
" quotation mark "
# number sign #
$ dollar sign $
% percent sign %
& ampersand &
' apostrophe '
( left parenthesis (
) right parenthesis )
* asterisk *
+ plus sign +
, comma ,
- hyphen -
. period .
/ slash /
: colon :
&#59; semi-colon ;
&#60; less than <
&#61; equals sign =
&#62; greater than >
&#63; question mark ?
&#64; at @
&#91; left square bracket [
&#92; bbackslash \
&#93; right square bracket ]
&#94; caret ^
&#95; underscore _
&#96; acute accent `
&#123; left curly brace {
&#124; vertical bar |
&#125; right curly brace }
&#126; tilde ~

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网