/** * Get an elements text content * * @param element the element * @param trim whether to trim * @param replace whetehr to replace properties * @return the concatentation of the text nodes * @throws Exception for any error */ public static String getElementTextContent(Element element, boolean trim, boolean replace) throws Exception { String rawText = getRawElementTextContent(element); return trimAndReplace(rawText, trim, replace); }
/** * Get an elements text content * * @param element the element * @param trim whether to trim * @param replace whetehr to replace properties * @return the concatentation of the text nodes * @throws Exception for any error */ public static String getElementTextContent(Element element, boolean trim, boolean replace) throws Exception { String rawText = getRawElementTextContent(element); return trimAndReplace(rawText, trim, replace); }
/** * Get an element's text content, looking for "trim" and "replace" attributes * on the element to determine whether to trim the text and/or perform * system property substitution. * * @param element the element * @return the concatentation of the text nodes * @throws Exception for any error */ public static String getElementTextContent(Element element) throws Exception { boolean replace = getReplace(element); boolean trim = getTrim(element); String rawText = getRawElementTextContent(element); return trimAndReplace(rawText, trim, replace); }
/** * Get an <code>attribute</code> element's text content, looking for "trim" and "replace" attributes * on the element to determine whether to trim the text and/or perform * system property substitution. * * @param element the element * @return the concatentation of the text nodes * @throws Exception for any error */ public static String getElementTextContent(Element element) throws Exception { boolean replace = getReplace(element); boolean trim = getTrim(element); String rawText = getRawElementTextContent(element); return trimAndReplace(rawText, trim, replace); }