Questions tagged [cdata]

CDATA (literally, character data) is data that will not be parsed as markup in XML and SGML documents.

While technically "all text that is not markup constitutes the character data" of an XML document (and a similar definition applies for SGML), the term CDATA is typically used in the context of CDATA sections.

A CDATA section begins with the string <![CDATA[ and ends with the string ]]>. The data inside a CDATA section is not parsed as markup within an XML or SGML document - which can be useful when representing XML or SGML within an XML or SGML document:

<![CDATA[
  <html>
    <head>
      <title>This is not markup ...</title>
    </head>
    <body>
      <p>... and neither is this.</p>
    </body>
  </html>
]]>

A CDATA section may contain any sequence of characters except for the string ]]> (which would terminate the section). One way to work around this limitation is to terminate the CDATA section after the string ]] and then begin a new one immediately, starting with the final >. For instance,

<![CDATA[How to represent ']]]]><![CDATA[>' inside a CDATA section.]]>

is equivalent to

How to represent ']]>' inside a CDATA section.
1111 questions
-1
votes
1 answer

Get value from a CDATA in xml

I dont know how get a lat, lon in php values from this xml code: OpenCellID Cells List of available…
-1
votes
2 answers

What's the use of in xml?

Am new to xml. My question is: If the lines inside a CDATA are ignored by an XML parser, does it mean the lines are not executable and if so, is it just the same as a comment?
shadowBot
  • 119
  • 1
  • 6
-1
votes
2 answers

How do I convert the following XML data into an array (JSON or otherwise)

Whilst there are plenty of options for converting "normal" XML into an array I'd dearly love to find a way of converting this data into an array that I can process with PHP (it's currently designed to be processed by JQuery)
Ollie Brooke
  • 64
  • 10
-1
votes
1 answer

“//” …“ //]]>” appears on the JSF page when “ //” are used to wrap a html template

I'm trying to add the html5 drag 'n drop upload file on my JSF web page so i had to add this script into it :