Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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.

Replies are listed 'Best First'.
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.

    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


      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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://520568]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2018-05-21 13:57 GMT
Find Nodes?
    Voting Booth?