Code example for LSOutput

Methods: setCharacterStream, setEncoding

0
	 * Place a string into the attribute <tag>of the element <el>, encoded so special characters can be used. 
	 *  
	 * @param el 
	 *        The element. 
	 * @param tag 
	 *        The attribute name. 
	 * @param value 
	 *        The string. 
	 */ 
	public static void encodeAttribute(Element el, String tag, String value)
	{ 
		// encode the message body base64, and make it an attribute 
		try 
		{ 
			String encoded = new String(CommonsCodecBase64.encodeBase64(value.getBytes("UTF-8")),"UTF-8");
			el.setAttribute(tag, encoded);
		} 
		catch (Exception e)
		{ 
			M_log.warn("encodeAttribute: " + e);
		}