Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
<body><![CDATA[]]></body>
或者
<body></body>
每个都有区别或缺点吗?在解析 XML 时我需要做任何事情吗?你喜欢哪个?
就 XML 解析器而言,没有区别。如果您希望在 XSLT 输出期间强制创建 CDATA,则可以使用一个选项 (cdata-section-elements) 使某些元素输出 CDATA。