Difference between PCDATA and CDATA in DTD

后端 未结 6 1798
耶瑟儿~
耶瑟儿~ 2020-12-04 06:52

What is the difference between #PCDATA and #CDATA in DTD?

6条回答
  •  粉色の甜心
    2020-12-04 07:52

    PCDATA – parsed character data. It parses all the data in an XML document.

    Example:

    
        mom
        dad
    
    

    Here, the element contains 2 more elements: and . So it parses further to get the text of mother and father to give the text value of family as “mom dad”

    CDATA – unparsed character Data. This is the data that should not be parsed further in an xml document.

    
        mom
           dad
        ]]>
    
    

    Here, the text value of family will be momdad.

提交回复
热议问题