How to get by javafx webview content iframe loaded page?

In an open page loaded frame:

 <iframe id="wikipedia" src="http://en.wikipedia.org"></iframe>

Trying to get to the content:

Document document = webEngine.getDocument();
Element elementById = document.getElementById("wikipedia");
System.out.println(elementById.getTextContent());

But do not achieve results ...

Answers


The following code works fine with javafx2:

Document doc = webEngine.getDocument();
HTMLIFrameElement iframeElement = (HTMLIFrameElement) doc.getElementById("wikipedia");
Document iframeContentDoc = iframeElement.getContentDocument();
Element rootElement = iframeContentDoc.getDocumentElement();
System.out.println(rootElement.getTextContent());

Need Your Help

Play Morphia, Cannot grab List Content of (Generic) Embedded Object

playframework morphia playframework-1.x

I am working with Play Framework 1.2.5 and the morphia-1.2.9a module. I was originally using @Reference annotations on my models but due to the fact that (lazy=true) is not working on @Reference's, I

Problem with regex for text parsing (similar to textile)

php regex markup textile

I'm banging my head against the wall trying to figure out a (regexp?) based parser rule for the following problem. I'm developing a text markup parser similar to textile (using PHP), but i don't kn...