Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: httpwebwitch
<![CDATA[ <img src='http://www.example.com/images/1_thumb.jpg' border='0' /><br/>
Text description of item
At the moment I'm parsing it so that the entire element is output "as is", with the image, then the line break, then the text description.
Is there any way of parsing this so that I can get the image and the text description as separate elements?
P.S. My parsing knowledge is minimal, at the moment I have just adapted an existing script to do this for me.
That said, there are parser-specific extensions that will read text into nodes, such as saxon:parse(). Check the documentation on your parser to see if such a function is supported.
As I noted, there are extensions to the common parsers which will force it to interpret the contents of a CDATA section as XML nodes, but these are specific to the parser being used.