473,396 Members | 1,970 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

![CDATA[

I always see ![CDATA[ in XML page, what does this mean?

May 2 '07 #1
4 1751
ra************@gmail.com wrote:
I always see ![CDATA[ in XML page, what does this mean?
http://www.w3.org/TR/2006/REC-xml11-...sec-cdata-sect

What it really means is that whoever wrote the XML file was sloppy.
CDATA Sections are an ugly cluge intended to make manually
copy-and-pasting non-XML data into an XML file a little easier. The
proper solution is to use XML-aware tools, which will escape individual
characters when necessarily (and only when necessary).

If any tool actually requires the use of CDATA Sections rather than
escaping on a character-by-character basis, it's badly broken and should
be replaced.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
May 2 '07 #2
In article <4638e3b2$1@kcnews01>,
Joseph Kesselman <ke************@comcast.netwrote:
>What it really means is that whoever wrote the XML file was sloppy.
CDATA Sections are an ugly cluge intended to make manually
copy-and-pasting non-XML data into an XML file a little easier. The
proper solution is to use XML-aware tools, which will escape individual
characters when necessarily (and only when necessary).
However, it also makes the data more human-readable, which seems very
desirable when, for example, including a computer program in an XML
document.

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
May 2 '07 #3
Richard Tobin wrote:
However, it also makes the data more human-readable, which seems very
desirable when, for example, including a computer program in an XML
document.
Only if you're editing the document as XML source. If you're using an
XML-aware editing tool, the content is simply the content and is as
human-readable one way as the other. Escaping choices should be purely
an artifact of the datastream rather than of the document semantics, and
the user shouldn't have to look at them.
--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
May 2 '07 #4
In article <4638f180$1@kcnews01>,
Joseph Kesselman <ke************@comcast.netwrote:
>However, it also makes the data more human-readable, which seems very
desirable when, for example, including a computer program in an XML
document.
>Only if you're editing the document as XML source.
Which I often am. As the design goals for XML put it, "XML documents
should be human-legible and reasonably clear". XML is not just an
internal format.
>Escaping choices should be purely
an artifact of the datastream rather than of the document semantics,
Yes...
>and the user shouldn't have to look at them.
.... but I don't see how that follows. Escaping choices should not
affect document semantics, so they can be made for reasons such as
human convenience.

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
May 2 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Balaras | last post by:
Hi, Can sombody here please help me a bit with a regular expression. I have a xml file where I need to strip the CDATA sections of any contained data. Eg. <xml> <tag><]></tag>...
8
by: Xah Lee | last post by:
what does it mean when a style tag gives something like the following? <style type="text/css" media="screen,projection">/*<!]>*/</style> is this standard? Xah xah@xahlee.org ∑...
6
by: Cade Perkins | last post by:
How can the CDATA ending delimiter "]]>" be represented within a CDATA section itself? Consider an XML document that is intended to contain an embedded, uninterpreted XML example. Generally,...
10
by: Jon Noring | last post by:
Out of curiosity, may a CDATA section appear within an attribute value with datatype CDATA? And if so, how about other attribute value datatypes which accept the XML markup characters? To me,...
11
by: ericms | last post by:
Can anybody show me how to insert a CDATA section using XPathNavigator ? I have tried the follwing with no luck: XmlDocument docNav = new XmlDocument(); docNav.LoadXml(xmlString);...
1
by: soccerdad | last post by:
I've got a class hierarchy generated from a .xsd schema file using the XSD.EXE tool. One of the elements will have its "inner text" set to a CDATA block. The XSD.EXE tool exposed a "Value" property...
12
by: Peter Michaux | last post by:
Hi, I am experimenting with some of the Ruby on Rails JavaScript generators and see something I haven't before. Maybe it is worthwhile? In the page below the script is enclosed in //<!]> ...
7
by: Max | last post by:
Hello everyone! Can anyone help me to convert the CDATA expression "CDATA ::= (Char* - (Char* ']]>' Char*)" to Javascript Regular Expression? Thanks, Max
6
by: dkyadav80 | last post by:
Hi sir, I'm new about xml, javascript. I have two selection field(html) first is city and second is state. the city and state values should be store in xml file. when user select city then all...
3
by: vm35 | last post by:
I'm trying to access CDATA inside XML file, works fine in FF but not IE (pretty much all versions). If anyone has any suggestions, please help. Thanks in advance. XML:<?xml version="1.0"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.