Semantic analysis...
Write a conditional to process the tag contents. You will have code like
this :
if (node instanceof HTMLLinkTag) {
HTMLLinkTag linkTag = (HTMLLinkTag) node;
if (linkTag.getLink().indexOf("http://rd.yahoo.com")==0) {
// print the tag or display it however you want
}
}
Regards
Somik
----- Original Message -----
From: "Sodergren, M.G." <mg...@le...>
To: <htm...@li...>
Sent: Tuesday, April 30, 2002 2:19 AM
Subject: [Htmlparser-user] extracting only certain links
Hello.
When i enter a url like http://search.yahoo.com/bin/search?p=SEARCHENTERED
(yahoo result page for SEARCHENTERED),the program extracts all the links
from the html page but i just want it to extract the links that are returned
as the result of my search by yahoo, so for example (with yahoo), all the
links beginning with <a href="http://srd.yahoo.com
but not the links beginning with <a href="http://rd.yahoo.com/
so in other words all the links with srd and not rd.
How would i solve this problem? What code do i put and where?
Thanks
Mats
_______________________________________________
Htmlparser-user mailing list
Htm...@li...
https://lists.sourceforge.net/lists/listinfo/htmlparser-user
|