Re: [Htmlparser-user] help desperately needed! parser wont parse properly
Brought to you by:
derrickoswald
|
From: Somik R. <so...@ya...> - 2002-09-13 05:54:44
|
Hi,
You can try the same thing with runParser http://www.amazon.com -l
It works fine for me, but from your code it looks like you are using
htmlparser 1.1. That is very old.
Can u upgrade to the latest integration release ?
Regards,
Somik
----- Original Message -----
From: "ope tomori" <op...@ho...>
To: <htm...@li...>
Sent: Friday, September 13, 2002 12:23 AM
Subject: [Htmlparser-user] help desperately needed! parser wont parse
properly
>
>
> Hello anyone.. Im using this parser on a research project. Im building a
> browser in java, using JEditorPane as the panel that displays the html on
> the websites. I have succeeded in doing that.
>
> The next step was to parse the links on the website and we came across
this
> parser, anyway, i set up the kizna classes and i used this piece of code:
>
> file://this is in the actionPerformed function, when you press the "GO"
Button
>
> HTMLParser parser = new HTMLParser(urlAddress);
> parser.registerScanners();
> for (Enumeration e = parser.elements();e.hasMoreElements();) {
> HTMLNode node = (HTMLNode)e.nextElement();
> if (node instanceof HTMLLinkTag) {
> HTMLLinkTag linkTag = (HTMLLinkTag)node;
> System.out.println("Link Tag is " + linkTag.getLink());
> }
> }
>
> when i run the browser with say, amazon.com, this is the result i get:
> *****************************************************
> Address : http://www.amazon.com
> tagContents: a
>
href="http://www.amazon.com/exec/obidos/subst/home/home.html/ref=wt_404page/
"
> Link Tag is
> http://www.amazon.com/exec/obidos/subst/home/home.html/ref=wt_404page/
> tagContents: table border=0 align=center cellpadding=4
> tagContents: a
> href="http://www.amazon.com/exec/obidos/subst/home/home.html/ref=404page/"
> Link Tag is
> http://www.amazon.com/exec/obidos/subst/home/home.html/ref=404page/
>
>
> ***********************************88
>
> when i checked the link tag, its redirects to the amazon home page. Can
> someone pls tell me what im doing wrong?
>
> Thanks
>
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Htmlparser-user mailing list
> Htm...@li...
> https://lists.sourceforge.net/lists/listinfo/htmlparser-user
|