We have a simple XML file that has a single element with several attributes and CDATA inside. The portal template uses the XML Data Source and Basic Repeater webparts. The transformation works fine on the attributes with a simple Eval("attribute"), but numerous approaches haven't been able to pull the CDATA.
We're running v7.0.29, using the portal engine.
The XML file right now is in the CMS for development purposes, but ultimately we may want to point the XML Data Source webpart to an external file. The WHERE statement in the Data Source webpart is set to return only type='4030' — there are about 10 types in the XML file. The XML is structured like so:
<posts>
<post type="4030" file="posts1207.xml" date="12/7/2012" title="WILLIAM RHOLL">
<![CDATA[<p style="text-align:left;">#123456</p><p style="text-align:center;"><strong>WILLIAM RHOLL</strong></p>
<p style="text-align:center;"><strong>Posting</strong></p>
<p style="text-align:justify;text-justify:auto;">The Great, Magnificent Lebowski. No. 144677.</p>
<p style="text-align:justify;text-justify:auto;">Lebowski ipsum well sir, it's this rug I have, really tied the room together. Dolor sit amet, consectetur adipiscing elit praesent ac magna justo pellentesque ac lectus. When he moved down to Venice he had to go door-to-door to tell everyone he's a pederast.</p>
<p style="text-align:justify;text-justify:auto;">This is not the issue! Suscipit malesuada non, ultrices non urna sed orci ipsum. Look at that freaking phony, Dude! Pretending to be a millionaire! Placerat id condimentum rutrum, rhoncus ac. Would it be possible for me to get my twenty grand in cash?</p>
<p style="text-align:left;">1234567</p>
<p style="text-align:left;">Dec 7, 2012</p>]]>
</post>
<post type="4030" file="posts1207.xml" date="12/7/2012" title="JOHN GOODMAN">
<![CDATA[<p style="text-align:left;">#123456</p><p style="text-align:center;"><strong>JOHN GOODMAN</strong></p>
<p style="text-align:center;"><strong>Posting</strong></p>
<p style="text-align:justify;text-justify:auto;">Vee belief in nossing, Lebowski. No. 1236677.</p>
<p style="text-align:justify;text-justify:auto;">I gotta check this with my accountant of course. Lorem aliquam placerat posuere neque.</p>
<p style="text-align:justify;text-justify:auto;">Nice marmot. Ut ultricies ipsum morbi eget risus nulla nullam vel nisi enim, vel auctor. All right, Plan B. You might want to watch out the front window there, Larry. Ante morbi id urna vel felis lacinia placerat vestibulum. They call Los Angeles the City of Angels.</p>
<p style="text-align:left;">7654321</p>
<p style="text-align:left;">Dec 7, 2012</p>]]>
</post>
</posts>
This transformation works OK in the Basic Repeater for the attributes:
<div><%# Eval("date") %> — <%# Eval("type") %> — <%# Eval("title") %></div>
However, <%# EvalCDATA("post") %> doesn't return the CDATA. We need a transformation to return the text and render the HTML in the CDATA container.
Any suggestions for the transformation? Also, any suggestions on webparts for searching the XML and returning a results list with links to each <post> in the result set and then displaying a single <post>?