Even though the CDATA section is removed, the whitespace is properly preserved.
虽然去掉了cdata节,但空白正确地保留了下来。
You can't take just any data and dump it into a CDATA section and still have a valid document.
您不能将任何数据随意地塞到一个CDATA区域中同时还拥有一个有效的文档。
Each CDATA section, comment, processing instruction, and non-leaf node is assigned a binary codeword.
每个CDATA部分、注释、处理指令和非叶节点都被分配一个二进制代码字。
Clearly the CDATA section is useful, but like all good things, it has a couple of limitations for you to keep in mind.
显然,CDATA区域很有用;但与其他所有好东西一样,它也有几个应该牢记的限制。
The hack uses a combination of the <xsl:text> element and a CDATA section to force the XSLT processor to accept the split
这种拆分方法使用 <xsl:text>元素和CDATA节的组合来强迫XSLT处理器接受拆分
What can you do if you need to put a section end marker into a CDATA section?
如果您需要将区域结束标记放到CDATA区域中,那么该怎么办呢?
A better solution might be to put the data directly into your XML document. That's where XML's CDATA section comes into play.
更好的解决方案可能是将数据直接放到您的XML文档中,那就是XML的CDATA区域发挥作用的时候了。
In fact, that's the reason why you should wrap an embedded script in a CDATA section instead of an XML comment-comments are too fragile.
事实上,那就是为什么应该将嵌入式脚本封装到CDATA区域而不是xml注释中的原因—注释太脆弱了。
One solution is to prepare a CDATA section, as in Listing 3, for the code block and just paste into that so that you don't need further escaping.
一种解决方案是使用CDATA部分,如清单3 所示,将代码直接粘贴到这个代码块,这样就不需要进行进一步的转义了。
If the XML parser reads this sequence, it's the end of your CDATA section and you might end up getting a parser error when it hits the real section end.
如果xml解析器读到这个序列,就认为您的CDATA区域结束,当解析器遇到真正的区域结尾时,可能会发出一条解析错误消息。
If the data happens to be text, you can dump it into a CDATA section and be done with it, but true binary data needs to be encoded in a safe and recoverable manner.
如果这些数据碰巧是文本,您只需将它们放到CDATA区域中,但真正的二进制数据需要以一种安全且可恢复的方式编码。
The Details element contains a brief HTML description of the detector, and should therefore be contained in a CDATA section. This description is used by the UI, as shown in Figure 2
Details元素包含检测器的简单HTML描述,因而应当包含在CDATA部分中。
Even though the contents of the CDATA section pass through your parser untouched, they still need to be valid XML data characters, as specified by the document's character encoding.
即使CDATA区域的内容完好无损地通过您的解析器,它们仍需是有效的XML数据字符,正如文档的字符编码所规定的一样。
Even though the contents of the CDATA section pass through your parser untouched, they still need to be valid XML data characters, as specified by the document's character encoding.
即使CDATA区域的内容完好无损地通过您的解析器,它们仍需是有效的XML数据字符,正如文档的字符编码所规定的一样。
应用推荐