2017년 12월 27일 수요일

11.1 How to use special characters in XML?


11.1 How to use special characters in XML?

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 tabnon-printing

Line feednon-printing

Carriage Returnnon-printing
 Spacenon-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~

이 글은 Evernote에서 작성되었습니다. Evernote는 하나의 업무 공간입니다. Evernote를 다운로드하세요.

댓글 없음:

댓글 쓰기