Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Takes an escaped string, as generated by {@link XMLUtils#escapeData(String)} and returns its original form.
     * 
     * @param data escaped string as generated by {@link XMLUtils#escapeData(String)}, never null.
     * @return original, unescaped string, never null.
     */
    public static String unEscapeData(String data) {
        data = data.replace("&lt;", "<");
        data = data.replace("&gt;", ">");
        data = data.replace("&amp;", "&");

        return data;
    }
}