Adding special characters to xml

Some characters as < and > are used to format xml (and html). However it is also desired to use them in the xml content. To distinguish if they are tags or content some method needs to be introduced. If those characters are used in the content they will be written differently, a & sign is used to mark them and some regular characters are added to define the character. The ; character finally is used to mark that this special sequence is terminated. Unicode characters can be added as &#<decimal number>; or &#x<hex number>;

Here some samples: ♘, ☠ and ⡓ this is also a challenge for your computer to find the font that matches.

Such sequences are called entities.

Table 11.1. Special characters

&lt; < lower than
&gt; > greater than
&quot; " quote
&amp; & ampersand


The & character is not used to format xml but is still not allowed to be used since it marks a beginning of a special character.

Linurs Servernest startpage