PDA

View Full Version : display actual html in XML


sushestvo
10-17-2005, 03:08 PM
I have in my XML:
/DATA/ITEM/HTML
where HTML =
<HTML>&lt;p&gt;mzafcukaas das dasd&lt;/p&gt;&lt;p&gt;&lt;strong&gt;asdfjdsjfskdf&lt;/strong&gt;&lt;/p&gt;</HTML>
so it's actual text with HTML tags.... from Content editor.
I have .xsl preview page where I want to display that content WITH tags in table or textarea or whatever to preview how it would look like.
How can I do this on .xsl page?

sushestvo
10-17-2005, 03:13 PM
nevermind im stupid.. i figured it out :)

Alex Vincent
10-18-2005, 04:25 PM
Others probably haven't; would you mind sharing your solution? :)

gsnedders
10-25-2005, 11:45 AM
I'd just escape the HTML as CDATA, like so:
<HTML><![CDATA[<p>mzafcukaas das dasd</p><p><strong>asdfjdsjfskdf</strong></p>]]></HTML>

Note that just having <!ELEMENT HTML (#CDATA)> in the doctype is not enough, as it's always overridden... :(