James, what if I want the text pre evaluation?
--
dIon Gillard, Multitask Consulting
Work:      http://www.multitask.com.au
Developers: http://adslgateway.multitask.com.au/developers

"James Strachan" <[EMAIL PROTECTED]> wrote on 06/30/2002 05:38:03 
PM:

> From: <[EMAIL PROTECTED]>
> > Can a jelly tag get the text of it's body, before processing?
> 
> Absolutely. There's a helper method on TagSupport for this..
> 
> public class MyTag extends TagSupport {
> 
>     public void doTag(XMLOutput output) throws Exception {
>         // evaluate my body and get the textual value of it...
>         String text = getBodyText();
>     }
> }
> 
> If you just want to invoke your tag's body and possibly consume the XML
> events you can call the invokeBody() method instead passing some 
XMLOutput
> object, which could be the same object your tag is using or some other
> place. Its easy to create a new XMLOutput from a SAX ContentHandler so 
if
> you wanted to do some kind of XML parsing/processing/transformation of 
your
> body it should be pretty easy to do.
> 
> James
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> --
> To unsubscribe, e-mail: 
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>
> 


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

Reply via email to