Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > ![CDATA[

Reply
Thread Tools

![CDATA[

 
 
ranch99ranch99@gmail.com
Guest
Posts: n/a
 
      05-02-2007
I always see ![CDATA[ in XML page, what does this mean?

 
Reply With Quote
 
 
 
 
Joseph Kesselman
Guest
Posts: n/a
 
      05-02-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
 
Richard Tobin
Guest
Posts: n/a
 
      05-02-2007
In article <4638e3b2$1@kcnews01>,
Joseph Kesselman <(E-Mail Removed)> wrote:

>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.
 
Reply With Quote
 
Joseph Kesselman
Guest
Posts: n/a
 
      05-02-2007
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
 
Reply With Quote
 
Richard Tobin
Guest
Posts: n/a
 
      05-02-2007
In article <4638f180$1@kcnews01>,
Joseph Kesselman <(E-Mail Removed)> 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.


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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments