it is possible but you will be blocked or get a security warning if
you access a URL outside your site. You might wonder 'why would I
scrap my own site?', well ask my boss that want to index all pages
from our intranet.
If you use this code to get the content
public native String getIFRAMEBodyContent(String iframeId); /*-{
return
document.getElementById(iframeid).contentWindow.document.body.innerHTML);
}-*/
once you have the HTML with the content you can wrap it with an HTML
object:
HTML html = new HTML(getIFRAMEBodyContent("myIframe"));
Element rootElement = html.getElement();
// be happy
In case you must scrap pages outside your domain and this must be done
in the browser, you can use a Signed Java Applet (would be a great
exercise of your java knowledge).
Anyway, the easiest way would be with server side code as *lineman78*
and *cokol* said.
Cheers,
Henrique Viecili
--
Think outside the box, limitations are self imposed!