Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: CDATA in an XML file for parsing.

by Aristotle (Chancellor)
on Jan 03, 2006 at 12:10 UTC ( #520568=note: print w/ replies, xml ) Need Help??


in reply to Re: CDATA in an XML file for parsing.
in thread CDATA in an XML file for parsing.

The point is that <![CDATA[<foo>]]> and &lt;foo&gt; mean exactly the same thing. If you need to treat them differently, some piece of software in your chain is broken. (Yes, that means serving XHTML as HTML is broken.)

CDATA is a shortcut for when text contains a lot of literal angle brackets and carries no further meaning.

Makeshifts last the longest.


Comment on Re^2: CDATA in an XML file for parsing.
Select or Download Code
Re^3: CDATA in an XML file for parsing.
by BaldPenguin (Friar) on Jan 03, 2006 at 17:05 UTC
    I do not disagree that they are the same, and I have no intent on treating them differently. However, your comment on some peice of software in the chain being broken caught my attention. On of the main uses I have for XML is actually XSLT transforms. In that code I have in the paste used blocks of data from a database that contain XML markup, in sort of an basic content management schema. What would your suggestion be for obtaining that content and inserting it into the XML document before it goes to the transfomer.

    Don
    WHITEPAGES.COM | INC
    Everything I've learned in life can be summed up in a small perl script!

      There are many many good articles and discussion threads out there that discuss this same (or similar) scenario.

      for example: this thread and this excellent article by tmoertel

      =oQDlNWYsBHI5JXZ2VGIulGIlJXYgQkUPxEIlhGdgY2bgMXZ5VGIlhGV

      Youíre not giving me enough information to understand what the problem is and which constraints you need to honour, Iím afraid. Can you explain in more detail?

      Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://520568]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (13)
As of 2014-09-02 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (22 votes), past polls