XML CDATA

Click Here

All XML elements are interpreted by the XML parser.

If we want any part of the text is not analyzed, then use CDATA.

A CDATA section starts with <![CDATA[ and ends with ]]>

<?xml encoding="UTF-8"?> <mails> <message>     <message>          <to>John</to>          <from>Peter</from>          <title>Meeting</title>          <text>Remember out meeting</text>     </message> </message> <![CDATA[ free unstructured data ]]> </mails>

The preceding XML is still valid because the text "free unstructured data" is not interpreted by the XML parser because it is a CDATA.

In this section CDATA can be anything we want, for example, JavaScript code.


Click Here