Android XML String Unescape replaceEscape(String result)

Here you can find the source of replaceEscape(String result)

Description

replace Escape

Declaration

private static String replaceEscape(String result) 

Method Source Code

//package com.java2s;

public class Main {
    private static String replaceEscape(String result) {
        if (result == null) {
            return "";
        }/*w w  w . j  a va  2  s.c  o m*/

        // Replace XML escape characters
        result = result.replace("\\n", "\n");
        result = result.replace("'", "'");
        result = result.replace(""", "\"");
        result = result.replace("apos;", "'");
        result = result.replace("quot;", "\"");
        result = result.replace("&lt;", "<");
        result = result.replace("&gt;", ">");
        result = result.replace("&amp;", "");
        return result;
    }
}

Related

  1. xmlUnescape(String xml)
  2. unescape(String input)
  3. unescape(String source)
  4. unescapeXML(final String xml)
  5. urlEscape(String s)
  6. replaceEscapeSequence(String input)
  7. unescape(String text)