Java XML Unescape unescapeXMLEntity(String str)

Here you can find the source of unescapeXMLEntity(String str)

Description

unescape XML Entity

License

LGPL

Declaration

private static String unescapeXMLEntity(String str) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    private static String unescapeXMLEntity(String str) {
        if ("lt".equals(str))
            return "<";
        if ("gt".equals(str))
            return ">";
        if ("amp".equals(str))
            return "&";
        if ("apos".equals(str))
            return "'";
        if ("quot".equals(str))
            return "\"";
        return "&" + str + ";";
    }/* w ww.  ja  va 2  s .c  om*/
}

Related

  1. unescapeXml(String xml)
  2. unescapeXML(String xml)
  3. unescapeXmlChars(String source)
  4. unescapeXMLComment(String content)
  5. unescapeXMLEntities(String text)
  6. unescapeXMLString(String str)
  7. unescapeXMLString2(String str)
  8. unescapeXmlSymbols(String s1)