Perl-Sensitive Sunglasses | |
PerlMonks |
Re: CDATA in an XML file for parsing.by dimar (Curate) |
on Jan 02, 2006 at 23:29 UTC ( [id://520472]=note: print w/replies, xml ) | Need Help?? |
You will do well to consider the admonition made earlier by Aristotle. If you find yourself tempted to reach for the 'CDATA' or 'entity-escaping' key-combination in your text-editor or IDE, do not do it unless and until you have given serious consideration to alternatives. Such as:
If you have control over the generation of the content, there is no excuse why you should not at least *consider* the alternatives. If you do *not* have control over the entire content, it is all the more reason to consider the woes of naively tossing around CDATA and escaping.
There are many many reasons why escaping and CDATA is often a bad way to go. This badness is exactly why perl has 'quotelike operators' and why MIME has 'multipart boundary delimiters'. XML has neither of these, so often people resort to CDATA and escaping, even when that is *not* the best, (or even a good) way to go.
=oQDlNWYsBHI5JXZ2VGIulGIlJXYgQkUPxEIlhGdgY2bgMXZ5VGIlhGV
In Section
Seekers of Perl Wisdom
|
|