I am creating a Jsoup Document by parsing an internal HTML page,
public Document newDocument(String path) throws IOException { Document doc = null; doc = Jsoup.connect(path).timeout(0).get(); return new HtmlDocument<Document>(doc); }
I would like to convert a Jsoup document to my org.w3c.dom.Document I used the available DOMBuilder library for this, but when parsing, I get org.w3c.dom.Document as null. I can not understand the problem, tried to search, but could not find the answer.
Code for creating a DOM W3C document:
Document jsoupDoc=factory.newDocument("http:localhost/testcases/test_2.html")); org.w3c.dom.Document docu= DOMBuilder.jsoup2DOM(jsoupDoc);
Can anyone help me with this?
source share