I just create a HTML document on Java using Jsoup. below is some part of the code
public static Document genDoc(String p) throws ProtocolException, IOException, InterruptedException, ParserConfigurationException{
........
return Jsoup.parseBodyFragment(html);
}
After I'm done with the document generation, I have to display it. I simply use XHTML panel from FlyingSaucer. This is the code
public static void main(String[] args) throws ProtocolException, IOException, InterruptedException, ParserConfigurationException{
Document doc = genDoc("http://www.mangareader.net/93-1-11/naruto/chapter-1.html");
XHTMLPanel xhp = new XHTMLPanel();
xhp.setDocument(doc);
........
}
I thought the class org.jsoup.nodes.Document inherited from ´org.w3c.dom.Document´. But I was wrong. Is there any way I can pass the object of ´org.jsoup.nodes.Document´ to generate a web view using XHTMLPanel without converting it to string or input stream or byte[] first?