/** * XML Encoding. * Replaces all '>' '<' '&', "'" and '"' with entity reference */ public static String XMLEnc(String s) { return XMLOrHTMLEnc(s, true, true, XML_APOS); }
/** * Like {@link #XMLEnc(String)}, but writes the result into a {@link Writer}. * * @since 2.3.24 */ public static void XMLEnc(String s, Writer out) throws IOException { XMLOrHTMLEnc(s, XML_APOS, out); }
/** * XHTML Encoding. * Replaces all '>' '<' '&', "'" and '"' with entity reference * suitable for XHTML decoding in common user agents (including legacy * user agents, which do not decode "&apos;" to "'", so "&#39;" is used * instead [see http://www.w3.org/TR/xhtml1/#C_16]) */ public static String XHTMLEnc(String s) { return XMLOrHTMLEnc(s, true, true, HTML_APOS); }
/** * XML encoding for attribute values quoted with <tt>"</tt> (not with <tt>'</tt>!). * Also can be used for HTML attributes that are quoted with <tt>"</tt>. * @see #XMLEnc(String) */ public static String XMLEncQAttr(String s) { return XMLOrHTMLEnc(s, false, true, null); }
/** * XML encoding without replacing apostrophes and quotation marks and * greater-thans (except in {@code ]]>}). * @see #XMLEnc(String) */ public static String XMLEncNQG(String s) { return XMLOrHTMLEnc(s, false, false, null); }
/** * Like {@link #XHTMLEnc(String)}, but writes the result into a {@link Writer}. * * @since 2.3.24 */ public static void XHTMLEnc(String s, Writer out) throws IOException { XMLOrHTMLEnc(s, HTML_APOS, out); }
/** * XML encoding without replacing apostrophes. * @see #XMLEnc(String) */ public static String XMLEncNA(String s) { return XMLOrHTMLEnc(s, true, true, null); }
/** * XML encoding without replacing apostrophes and quotation marks and * greater-thans (except in {@code ]]>}). * @see #XMLEnc(String) */ public static String XMLEncNQG(String s) { return XMLOrHTMLEnc(s, false, false, null); }
/** * XHTML Encoding. * Replaces all '>' '<' '&', "'" and '"' with entity reference * suitable for XHTML decoding in common user agents (including legacy * user agents, which do not decode "&apos;" to "'", so "&#39;" is used * instead [see http://www.w3.org/TR/xhtml1/#C_16]) */ public static String XHTMLEnc(String s) { return XMLOrHTMLEnc(s, true, true, HTML_APOS); }
/** * Like {@link #XMLEnc(String)}, but writes the result into a {@link Writer}. * * @since 2.3.24 */ public static void XMLEnc(String s, Writer out) throws IOException { XMLOrHTMLEnc(s, XML_APOS, out); }
/** * XHTML Encoding. * Replaces all '>' '<' '&', "'" and '"' with entity reference * suitable for XHTML decoding in common user agents (including legacy * user agents, which do not decode "&apos;" to "'", so "&#39;" is used * instead [see http://www.w3.org/TR/xhtml1/#C_16]) */ public static String XHTMLEnc(String s) { return XMLOrHTMLEnc(s, true, true, HTML_APOS); }
/** * XML encoding for attribute values quoted with <tt>"</tt> (not with <tt>'</tt>!). * Also can be used for HTML attributes that are quoted with <tt>"</tt>. * @see #XMLEnc(String) */ public static String XMLEncQAttr(String s) { return XMLOrHTMLEnc(s, false, true, null); }
/** * XML Encoding. * Replaces all '>' '<' '&', "'" and '"' with entity reference */ public static String XMLEnc(String s) { return XMLOrHTMLEnc(s, true, true, XML_APOS); }
/** * Like {@link #XHTMLEnc(String)}, but writes the result into a {@link Writer}. * * @since 2.3.24 */ public static void XHTMLEnc(String s, Writer out) throws IOException { XMLOrHTMLEnc(s, HTML_APOS, out); }
/** * Like {@link #XHTMLEnc(String)}, but writes the result into a {@link Writer}. * * @since 2.3.24 */ public static void XHTMLEnc(String s, Writer out) throws IOException { XMLOrHTMLEnc(s, HTML_APOS, out); }
/** * XML encoding without replacing apostrophes. * @see #XMLEnc(String) */ public static String XMLEncNA(String s) { return XMLOrHTMLEnc(s, true, true, null); }
/** * XML encoding without replacing apostrophes. * @see #XMLEnc(String) */ public static String XMLEncNA(String s) { return XMLOrHTMLEnc(s, true, true, null); }
/** * XML encoding for attribute values quoted with <tt>"</tt> (not with <tt>'</tt>!). * Also can be used for HTML attributes that are quoted with <tt>"</tt>. * @see #XMLEnc(String) */ public static String XMLEncQAttr(String s) { return XMLOrHTMLEnc(s, false, true, null); }
/** * XML Encoding. * Replaces all '>' '<' '&', "'" and '"' with entity reference */ public static String XMLEnc(String s) { return XMLOrHTMLEnc(s, true, true, XML_APOS); }
/** * Like {@link #XMLEnc(String)}, but writes the result into a {@link Writer}. * * @since 2.3.24 */ public static void XMLEnc(String s, Writer out) throws IOException { XMLOrHTMLEnc(s, XML_APOS, out); }