xsl-list
[Top] [All Lists]

[xsl] remove tags + CDATA tag out of big xml file

2010-01-29 08:32:26
Hello,

I have a big xml feed out of my content management system that
includes wysiwyg html tags inside CDATA tags.

I am looking for a way to remove the CDATA and only get the text.
CURRENT:
<add>
   <doc>
      <some_title>My title</some_title>
         <content><![CDATA[
<p>The <strong>keyword</strong> is nice to have but is not needed to
include in a solr feed</p><p><table cellspacing="2" cellpadding="2"
border="1" width="100%"><tbody><tr><td>&#201;tape 1&nbsp;:</td></tr>
]]></content>
   </doc>
   <doc>
      ....
   </doc>
</add>

WANTED:
<add>
   <doc>
      <some_title>My title</some_title>
         <content>The keyword is nice to have but is not needed to
include in a solr feed</content>
   </doc>
   <doc>
      ....
   </doc>
</add>

Cheers

-- 
[Bb](astia{2}n)?\s?[Ww](ak{2}ie)?$

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>