cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cordes <mcord...@maine.edu>
Subject Re: esql:get-string - preserving tags from beeing escaped?
Date Mon, 29 Jan 2001 16:30:04 GMT
On Mon, Jan 29, 2001 at 05:26:00PM +0100, Matthias Brunner wrote:
> "Kjell M. Myksvoll" wrote:
> > 
> > Hello,
> > 
> > I have a database where some fields contains text with embedded
> > (well-formed XML) tags. When retriving these fields using the
> > esql:get-string operator, the tags gets escaped/rewritten ('<'
> > replaced with &lt; and '>' with &gt; and so on).
> > 
> > This is definitly what one wants in most cases but here I want to
> > retrive the string unchanged (for processing by a xslt script later in
> > the cocoon processor chain).
> > 
> > Is this possible?
> > 
> You have to parse your string first. Try:
> 
> Document doc = xspParser.parse(
>    new InputSource(new StringReader(YOURSTRING)));
> Element el = doc.getDocumentElement();
> xspCurrentNode.appendChild(XSPUtil.cloneNode(el,document));


This works, but why not use <esql:get-xml column="xyz"/> instead.  
It is easy.

-matt

Mime
View raw message