how can we convert html to well formed xhtml by using Http class api,if possible please give a demonstration code....thanks
I just did it using Jsoup, if it works for you:
private String htmlToXhtml(final String html) {
final Document document = Jsoup.parse(html);
document.outputSettings().syntax(Document.OutputSettings.Syntax.xml);
return document.html();
}
Some useful content where my solution came from: