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]>

Reply via email to