Code: Select all
[b]This [i]is[/i][/b] [i]my sentence[/i] of text.
[b]< /code>
Java-Code: < /p>
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
public class HTMLParse {
public static void main(String args[]) throws IOException {
try{
File input = new File("/ab.html");
String html = FileUtils.readFileToString(input, null);
Document doc = Jsoup.parseBodyFragment(html);
doc.outputSettings().prettyPrint(false);
System.out.println(doc.html());
}
catch(Exception e){
e.printStackTrace();
}
}
}
Code: Select all
This [i]is[/i][/b] [i]my sentence[/i] of text.
[b]
Code: Select all
This [i]is[/i][/b] [i]my sentence[/i] of text.