Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    /**
     * decode the string to <, >, </
     * @param text
     * @return
     */
    public static String decodeString(String text) {
        String ret = null;
        ret = text.replaceAll("&lt;", "<");
        ret = ret.replaceAll("&gt;", ">");
        ret = ret.replaceAll("&apos;", "'");
        ret = ret.replaceAll("&quot;", "\"");
        ret = ret.replaceAll("&amp;", "&");
        return ret;
    }
}