Skip to main content

WebBrowser.getContent() returns incomplete info

3 replies [Last post]
bao20080417bao
Offline
Joined: 2009-12-29

Hi my friends, I used the JDIC in my project to capture the webpage, and I want to analyse the HTML code of the returned page, I've tried two methods as follows:

WebBrowser.getContent(); // method1
WebBrowser.executeScript("document.documentElement.outerHTML");//method2

but both of these have some problems: the returned info is not complete, some HTML tags are missed, and I find that there are some new characters added such as '0, 3063,', '0,3024,'. However, the page which is displayed in the JFrame is correct. So amazing......
So my question is how can I get the returned HTML. TKS~

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
taylans
Offline
Joined: 2008-08-18

the characters such as 30XX are seperators of jdic which are used between native parts and sockets. why do they appear is, the mechanism which sends and receives data between java and natvie side has some bugs. when you send the data from java to c or c to java, the buffers are not filled always properly. for example:

you are sending data such as
datadatadataSEPERATORdatadata
datadataSEPERATORdatatadatadata
when you send the whole block and the other side receives all in one step there is no problem. but sometimes (socket connections) the buffer is not filled and broken into parts and you send data such as

datadatadataSEP
ARATORdatadatadata

this time the reciever can not parse the info.

my solution was changing the c sources and both java sources and chaning the seperators into one character and making some controls so that the seperators do not mix with your real content.

taylans
Offline
Joined: 2008-08-18

30XX are not really seperators but they appear in the content when the seperators (..) are divided into parts when communicating.

bao20080417bao
Offline
Joined: 2009-12-29

Thank you so much, I've understood. But I can't find the c/c++ file and the java file which contains the SEPERATOR definition, could you tell me? Thanks