- java.lang.Object
-
- org.dhatim.fastexcel.XmlEscapeHelper
-
public class XmlEscapeHelper extends Object
Helper which can apply XML escaping to a string
-
-
Constructor Summary
Constructors Constructor Description XmlEscapeHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidappendEscaped(StringBuilder sb, String text)Append XML-escaped text to a StringBuilder without allocating per-character Strings.static Stringescape(String text)Apply XML escaping to a String.
-
-
-
Method Detail
-
escape
public static String escape(String text)
Apply XML escaping to a String. Invalid characters in XML 1.0 are ignored.- Parameters:
text- text to be escaped- Returns:
- escaped text
-
appendEscaped
public static void appendEscaped(StringBuilder sb, String text)
Append XML-escaped text to a StringBuilder without allocating per-character Strings. Invalid characters in XML 1.0 are ignored.- Parameters:
sb- target to append totext- text to be escaped
-
-