Code example for LSOutput

Methods: setCharacterStreamsetEncoding

	 * 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 
			String encoded = new String(CommonsCodecBase64.encodeBase64(value.getBytes("UTF-8")),"UTF-8");
			el.setAttribute(tag, encoded);
		catch (Exception e)
			M_log.warn("encodeAttribute: " + e);
Contextual code suggestions in your IDE  Get Codota for Java