Android XML String Escape XmlEscape(String value)

Here you can find the source of XmlEscape(String value)

Description

Xml Escape

License

Open Source License

Declaration

public static String XmlEscape(String value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String XmlEscape(String value) {
        if (value == null)
            return null;
        value = value.replaceAll("&", "&");
        value = value.replaceAll("<", "&lt;");
        value = value.replaceAll(">", "&gt;");
        return value;
    }//from   ww w. ja va 2 s.  c o m
}

Related

  1. escapeText(String rawText)
  2. getXmlEncoded(String text)
  3. encodeEntities(String content)
  4. encodeEntities(String content)
  5. encodeXML(final String str)
  6. xmlEscape(String source)
  7. appendPlainText(StringBuilder dest, String src)
  8. buildBuiltinXMLEntityMap()