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: &
.
How do I escape this ampersand in the source XML? I tried &
, but this is decoded as the actual ampersand character (&
), which is invalid in HTML.
So I want to escape it in such a way that it will be rendered as &
in the web page that uses the XML output.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…