What does <![CDATA[]]> in XML mean?

前端 未结 13 2173
独厮守ぢ
独厮守ぢ 2020-11-21 07:52

I often find this strange CDATA tag in XML files:


I have observed that this CD

相关标签:
13条回答
  • 2020-11-21 08:23

    It escapes a string that cannot be passed to XML as usual:

    Example:

    The string contains "&" in it.

    You can not:

    <FL val="Company Name">Dolce & Gabbana</FL>
    

    Therefore, you must use CDATA:

    <FL val="Company Name"> <![CDATA["Dolce & Gabbana"]]> </FL>
    
    0 讨论(0)
提交回复
热议问题