From: "James Strachan" <[EMAIL PROTECTED]>
> Hey Jeff
> From: "Jeff Turner" <[EMAIL PROTECTED]>
> > Is there any way in Jelly to save XML into a variable? It's possible to
> > <x:parse var="doc">, but then 'doc' is a Document, not XML. It is also
> > possible to output XML to a file via the <j:file> tag, but not to a
> > variable.
>
> Just a quick question; what do you want the XML output as. A large String?
> You could do this...
>
> <j:set var="foo">
>     <some>
>         <x m="l"/>
>     </some>
> <j:set>
> I just set the foo variable to be ${foo}
>
>
> The above works, though the downside of this is that any < chars will get
> encoded as &lt; etc. i.e. it treats the body as being plain text.

Note after some thought, this behaviour is kinda wierd. So I've added the
ability to not XML encode the < and > and & characters so that if you did

<j:set var="foo" encode="false">
    <some>xml</some>
<j:set>

then the value of foo would equal the String "<some>xml</some>" if thats of
any use to folks.

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to