Re: Get links
Derrick Oswald <[email protected]>
| Newsgroups | gmane.comp.parsers.htmlparser.user |
|---|---|
| Message-ID | <[email protected]> |
You probably want HasAttributeFilter("ahref") or probably better
NodeClassFilter(LinkTag.class).
Then the nodes in the list are LinkTags which have the method getLink().
On Fri, Oct 16, 2009 at 5:55 PM, <[email protected]> wrote:
> Hello
> I use HTML parser to retrive links from web pages.
> I had done this:
>
> Parser parser = new Parser(url);
> NodeList body = parser.parse(new HasAttributeFilter("a"));
>
> But It retrives the anchor text and not the link. How can I get links?
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Htmlparser-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/htmlparser-user
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Htmlparser-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htmlparser-user