Example usage for org.apache.commons.jelly XMLOutput write

List of usage examples for org.apache.commons.jelly XMLOutput write

Introduction

In this page you can find the example usage for org.apache.commons.jelly XMLOutput write.

Prototype

public void write(String text) throws SAXException 

Source Link

Document

Outputs the given String as a piece of valid text in the XML event stream.

Usage

From source file:com.cyclopsgroup.waterview.core.taglib.LocalizedTextTag.java

/**
 * Overwrite or implement method processTag()
 *
 * @see com.cyclopsgroup.waterview.utils.TagSupportBase#processTag(org.apache.commons.jelly.XMLOutput)
 *///from  w  w w  .j a va  2 s  .com
protected void processTag(XMLOutput output) throws Exception {
    String content = getBodyText(escape);
    output.write(content);
}

From source file:hudson.util.HyperlinkingOutTag.java

public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
    String text = value.evaluateAsString(context);
    if (text != null) {
        try {/*from   w  w w.jav  a  2 s .  co  m*/
            output.write(text.replace("&", "&amp;").replace("<", "&lt;").replaceAll("\\b(https?://[^\\s)>]+)",
                    "<a href=\"$1\">$1</a>"));
        } catch (SAXException e) {
            throw new JellyTagException("could not write the XMLOutput", e);
        }
    }
}