Re: [Htmlparser-user] Reg extracting links corresponding to a search string
Brought to you by:
derrickoswald
From: <lui...@dq...> - 2006-02-15 14:23:51
|
Hi Raj Check out the example applications bundled with the parser. They really help one to get acquainted to HTMLParser. In particular, for your problem check out this example: org.htmlparser.parserapplications.LinkExtractor It tells you how to extract links. Then you should use the class org.htmlparser.filters.LinkStringFilter or org.htmlparser.filters.LinkRegexFilter to get only links containning the string "sony" or "jvc". Hope this helps you. On Feb 15, 2006, at 5:29 AM, vraja sekaran wrote: > Hi guys > I am new to HTML parser. I am trying to extract the > links that corresponds to a search string. > For example > <dd><a > href="/Camcorders--reviews--brand_sony">Sony</a> <tt>(415)</ > tt><dd><a > href="/Camcorders--reviews--jvc">JVC</a> <tt>(385)</tt><dd><a > > ..... > > In the above source code I want to extract the link > corresponding to Sony or JVC according to the > requirement. > > Thank you guys > Raj |