Home  >  Article  >  Backend Development  >  php操作xml入门之cdata区段_php技巧

php操作xml入门之cdata区段_php技巧

WBOY
WBOYOriginal
2016-05-16 20:25:00864browse

本文实例讲述了php操作xml入门之cdata区段。分享给大家供大家参考。具体分析如下:

复制代码 代码如下:


 
  小乔
 
  23
 
    内容部分&*&$#^@*(#))$#*%#
  ]]>

 

 
  周瑜
 
  26
 


知识要点:

(1)xml文档中的文本,都会被 xml解析器解析,但cdata区段中的内容,是不会被解析的。所以,cdata中可以包含一些特殊字符,如&、 (2)cdata区段以 结束。

与CDATA对应的就是 PCDATA:PCDATA表示要被解析的文本,在 DTD 中定义约束。

希望本文所述对大家的php操作XML程序设计有所帮助。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn