Reputation: 187539
If I define an element such as this in a DTD
<!ELEMENT ud (#PCDATA)>
Are the following both valid?
<ud>foo & bar</ud>
<ud><![CDATA[foo & bar]]></ud>
Upvotes: 0
Views: 83
Reputation: 499072
Both are valid.
Placing content in a <![CDATA[]]>
section effectively means that whatever is in it will be ignored by the parser.
PCDATA
means only character data is allowed. CDATA
means, character data, so it is allowed within a PCDATA
context.
Upvotes: 1