0

<![CDATA[]]> 在 XML 代表什么意思有什么作用

vanessa created at6 years ago view count: 2468
report
回复
0

不想被转义的时候就用这个,比如像下面的数据,特殊字符都没有被转义

<exampleOfACDATA>
<![CDATA[
    Since this is a CDATA section
    I can use all sorts of reserved characters
    like > < " and &
    or write things like
    <foo></bar>
    but my document is still well formed!
]]>
</exampleOfACDATA>
6 years ago 回复
0

全称叫Character Data。在这个里面的字符都不会被解析,原样输出。

6 years ago 回复