Hi Cheng,
Would you please explain the meaning of next variable??? THX.
Sorry, I forgot about that.. The second variable is a string which =
denotes a default url. This is the url that will be used for resolving =
relative links. You can ignore the int param..
Regards,
Somik
----- Original Message -----=20
From: Cheng Jun=20
To: htm...@li...=20
Sent: Wednesday, July 03, 2002 12:00 AM
Subject: Re: Re: Re: [Htmlparser-user] Bug found
Dear Somik Raha,
THX for your reply.
I tried your suggesting at once. But got a problem. You gave me the =
code below.=20
StringReader sr =3D new StringReader(sb.toString());
HTMLReader reader =3D new HTMLReader(new BufferedReader(sr)); This =
should be HTMLReader(BufferedReader , int p1 / String p1)=20
HTMLParser parser =3D new HTMLParser(reader);
Would you please explain the meaning of next variable??? THX.
=20
Best wishes,
Cheng Jun
2002-07-03
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D2002-07-03 You =
write=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Hi Cheng,
This is just a little problem. In my project I need the =
absolute link. You may write another method to give the absolute link =
output.=20
I am not sure I understand.. As I mentioned earlier, the =
linkTag.getLink() provides you the absolute link (check =
http://htmlparser.sourceforge.net/javadoc/com/kizna/html/tags/HTMLLinkTag=
.html)=20
Another sugguestion. I write the my own page downloader. The =
problem is your parsing only paring the page avaiable in the HD.=20
Could you give us another interface to parse the page content =
stored in a String or StringBuffer or something else.=20
Oh, you can parse pages off a StringBuffer :). In fact, this =
is the basis of all testcases written for the parser. Check the source =
and see any of the scanner testcases. If you have a StringBuffer- this =
is what you could do - assuming you had a string buffer - sb.
StringReader sr =3D new StringReader(sb.toString());
HTMLReader reader =3D new HTMLReader(new BufferedReader(sr));
HTMLParser parser =3D new HTMLParser(reader);
Thats it! You can start parsing now. This is how we have over =
100 tests, giving specific inputs to the parser.=20
HTH.
Cheers,
Somik
=20
=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
|