I have some XML text that I wish to render in an HTML page. This text contains an ampersand, which I want to render in its entity representation: &.
&
The & character is itself an escape character in XML so the solution is to concatenate it and a Unicode decimal equivalent for & thus ensuring that there are no XML parsing errors. That is, replace the character & with &.