I want to convert a Webseite loaded by javaFX to JSOUP. p
ublic class database {
public static ArrayList<String> database = new ArrayList<String>();
public static ArrayList<Integer> laenge = new ArrayList<Integer>();
public static ArrayList<Integer> tiefe = new ArrayList<Integer>();
public static void main(String[] args) throws IOException, JSONException {
// TODO Auto-generated method stub
WebView browser = new WebView();
WebEngine webEngine = browser.getEngine();
String url = "http://www.google.com";
webEngine.load(url);
//get w3c document from webEngine
org.w3c.dom.Document w3cDocument = webEngine.getDocument();
// use jsoup helper methods to convert it to string
String htm = new org.jsoup.helper.W3CDom().asString(webEngine.getDocument());
// create jsoup document by parsing html
Document doc = Jsoup.parse(url, htm);
//Document doc = Jsoup.connect("http://ttp-schreiber.de/Mathematik/index2.html").get();
Element title = doc.body();
/*WebView browser = new WebView();
WebEngine webEngine = browser.getEngine();
webEngine.load("http://ttp-schreiber.de/Mathematik/index2.html");
*/
Elements html = doc.select("html");
Controller(html);
// System.out.println("+--+"+deeper(next(html,html.last()))[0][0]);
databasesafe();
}
I get these Error Message: Exception in thread "main" java.lang.ExceptionInInitializerError
How is the misttage?
ETC I have the example from here:
How to parse html from javafx webview and transfer this data to Jsoup Document?
In these line ist .get wrong: String html = new org.jsoup.helper.W3CDom().asString(webEngine.get);