Sample code for 30+ languages & platforms
Java

StringBuilder EntityDecode

Demonstrates the Chilkat StringBuilder EntityDecode method to decode HTML entities.

Chilkat Java Downloads

Chilkat2 Java
import com.chilkatsoft.chilkat2.StringBuilder;

public class ChilkatExample {

    public static void main(String[] args) {
        // Decode the following HTML entities, replacing each with the character represented.
        String s = "é é é Latin small letter e with acute";

        StringBuilder sb = new StringBuilder();

        sb.append(s);
        sb.entityDecode();

        // Output: é é é Latin small letter e with acute
        System.out.println(sb.getAsString());
    }
}