xml entity feature..

by barkkathulla 2012-09-22 11:48:57

THE XML SPECIFICATION PREDEFINES FIVE SPECIAL PIECES OF CODE FOR CHARACTERS THAT ARE NORMALLY RECOGNISED AS PART OF THE XML LANGUAGE ITSELF. THESE ARE CALLED ‘CHARACTER ENTITIES’ AND THEY MUST BE USED IF YOU WANT TO INCLUDE THOSE CHARACTERS AS PART OF AN ELEMENT’S CONTENT.CHARACTER ENTITIES USE A SPECIAL SYNTAX TO REPRESENT THE CHARACTER IN A WAY THAT AVOIDS THE XML PARSER INTERPRETING THE CHARACTER AS CODE.

&LT; REPRESENTS THE ‘<’ LEFT ANGLE BRACKET.
&GT; REPRESENTS THE ‘<’ RIGHT ANGLE BRACKET.
&AMP; REPRESENTS THE ‘&’ AMPERSAND CHARACTER.
&APOS; REPRESENTS THE ‘`’ SINGLE QUOTE APOSTROPHE.
&QUOTE;REPRESENTS THE ‘”’ DOUBLE QUOTATION MARK.

XML ALSO SUPPORTS CHARACTER REFERENCES THAT CREATE A CHARACTER USING ITS UNICODE CHARACTER CODE. THESE ARE WRITTEN IN THE XML DOCUMENT AS ‘&#NNN;’ WHERE ‘NNN’ IS THE REFERENCE NUMBER.THIS IS USEFUL TO ADD CHARACTERS THAT ARE NOT AVAILABLE ON YOU KEYBOARD.

Tagged in:

762
like
0
dislike
0
mail
flag

You must LOGIN to add comments