Class XmlWriter

    • Constructor Detail

      • XmlWriter

        public XmlWriter​(PrintWriter out)
        Constructs a new XmlWriter.
        Parameters:
        out - print writer
    • Method Detail

      • flush

        public void flush()
        Flushes the stream.
      • encode

        public static String encode​(String unencoded)
        Encode the given string in XML1.0 format. Optimized to fast pass strings that don't need encoding (normal case).
        Parameters:
        unencoded - the unencoded input string
        Returns:
        XML1.0 string
      • encode

        public static String encode​(String unencoded,
                                    boolean keepApos)
        Encode the given string in XML1.0 format. Optimized to fast pass strings that don't need encoding (normal case).
        Parameters:
        unencoded - the unencoded input string
        keepApos - true if apostrophe sign should stay as it is (in order to work around a Java bug that renders new JLabel("<html>&apos;</html>") literally as 6 character string, see #7558)
        Returns:
        XML1.0 string