Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > CDATA question

Reply
Thread Tools

CDATA question

 
 
Razvan
Guest
Posts: n/a
 
      01-11-2005


Hi !





Quote from www.w3schools.com:

CDATA is text that will NOT be parsed by a parser. Tags inside the text
will NOT be treated as markup and entities will not be expanded.


However I just inserted a character entity inside an attribute and the
entity was expanded by XML Spy. Who's right ? XML SPY or the w3schools
?




Regards,
Razvan

 
Reply With Quote
 
 
 
 
David Carlisle
Guest
Posts: n/a
 
      01-11-2005
"Razvan" <> writes:

> Hi !
>
>
>
>
>
> Quote from www.w3schools.com:
>
> CDATA is text that will NOT be parsed by a parser. Tags inside the text
> will NOT be treated as markup and entities will not be expanded.
>
>
> However I just inserted a character entity inside an attribute and the
> entity was expanded by XML Spy. Who's right ? XML SPY or the w3schools
> ?
>
>
>
>
> Regards,
> Razvan


The quote is presumably about CDATA sections <![CDATA[....]]> where it
is true that the (only) effect is that < and & no longer start markup
but are just treated as normal characters.

Entity and character references are expanded in attribute values. The
fact that the DTD declarations of attributes use the same word CDATA
is a historic artifact coming from SGML but there isn't really any
connection between these two uses of the word in an XML context.

David

 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CDATA Question mike XML 5 01-23-2007 11:43 PM
Quick question on the presence of CDATA Dilip XML 3 10-25-2006 06:29 PM
Can I un-CDATA my CDATA section and elaborate a transformation for the contained data? troppfigo@excite.it XML 3 03-06-2006 03:01 AM
Extracting CDATA Text without CDATA Tags??? John Davison Java 1 07-06-2004 11:00 PM
CDATA in XMLout Stefan Schmidt Perl 1 12-31-2003 01:18 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57