CDATA - Use of CDATA in Program Output

Use of CDATA in Program Output

CDATA sections in XHTML documents are liable to be parsed differently by web browsers if they render the document as HTML, since HTML parsers do not recognise the CDATA start and end markers, nor do they recognise HTML entity references such as < within

or this CSS example:

This technique is only necessary when using inline scripts and stylesheets, and is language-specific. CSS stylesheets, for example, only support the second style of commenting-out (/* ... */), but CSS also has less need for the < and & characters than JavaScript and so less need for explicit CDATA markers.

Read more about this topic:  CDATA

Famous quotes containing the words program and/or output:

    He believes without reservation that Kentucky is the garden spot of the world, and is ready to dispute with anyone who questions his claim. In his enthusiasm for his State he compares with the Methodist preacher whom Timothy Flint heard tell a congregation that “Heaven is a Kentucky of a place.”
    —For the State of Kentucky, U.S. public relief program (1935-1943)

    Lizzie Borden took an axe
    And gave her mother forty whacks;
    When she saw what she had done,
    She gave her father forty-one.
    —Anonymous. Late 19th century ballad.

    The quatrain refers to the famous case of Lizzie Borden, tried for the murder of her father and stepmother on Aug. 4, 1892, in Fall River, Massachusetts. Though she was found innocent, there were many who contested the verdict, occasioning a prodigious output of articles and books, including, most recently, Frank Spiering’s Lizzie (1985)