Bug in get the source?
Icaro Dourado <[email protected]> Wed, 9 Jan 2008 12:00:59 -0800 (PST)
| Newsgroups | gmane.comp.mozilla.jrex |
|---|---|
| Message-ID | <[email protected]> |
hi everyone,
I tried to recover the source page after it be loaded, by i couldn't get
that. I am trying to do:
String content = navigation.getContentString("text/html",
WebNavigationConstants.OUTPUT_RAW);
System.out.println(content);
but nothing comes! Only a empty string, all the time. I am SURE that i am
waiting enough time to the page be loaded because, using the DOM tree that
is returned (see code below), I can access the page (besides this is not
what I want, yet). Today I am getting this tree, and parsing it manually to
a html source, using the nodes, children and so, and building the html. BUT,
this is a big and poor solution, because naturally this is close to crash
due unknown tags, bad formatted tags on page, and so on
How I get the dom tree:
Document doc = navigation.getDocument();
Element ex = doc.getDocumentElement();
I have a doubt about this function too: is that supposed to be the "final"
html or the "input"/initial html? I mean, after a javascript be processed,
the dom tree may change, and the "final" html changes likewise.
I would appreciate any suggestion and help!
regards, Icaro
--
View this message in context: http://www.nabble.com/Bug-in-get-the-source--tp14719954p14719954.html
Sent from the MozDev - jrex mailing list archive at Nabble.com.