I have some XML text that I wish to render in an HTML page.
(我有一些XML文本希望在HTML页面中呈现。)
This text contains an ampersand, which I want to render in its entity representation: &
(这段文本包含一个&符号,我想以其实体表示形式呈现&
)
. (。)
How do I escape this ampersand in the source XML?
(如何在源XML中转义此“&”号?)
I tried &
(我试着&
)
, but this is decoded as the actual ampersand character ( &
), which is invalid in HTML . (,但这被解码为实际的&字符( &
), 在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. (在使用XML输出的网页中。)
ask by AJM translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…