Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: open
CDATA is "Character Data", and is essentially freeform data that needn't conform to XML syntax. Everything inside a CDATA section is ignored by the parser.
is the same as
If your data contains a lot of "&" and "<" characters, or if the data is fed in from an external source, it's usually easier to wrap it in a CDATA block instead of running it through a string replacement function.
CDATA also comes to the rescue when your data contains other non-entities like and "
I said the one example was "the same as" the other. of course they're not the same; they validate differently.
the similarity is that they accomplish the same thing and solve the same problem.
CDATA is your prophelactic against user-transmitted invalid entities.