Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class Main {
    public static String toXHTML(String html) {
        html = html.replaceAll("(?s)<script>.*?</script>", "<!-- removed scripts --!>");
        final Document document = Jsoup.parse(html);
        document.outputSettings().syntax(Document.OutputSettings.Syntax.xml);
        return document.html();
    }
}