From: Vera M. <mv...@ge...> - 2004-09-01 16:52:44
|
Bruce Faulkner wrote: > And, of course, if you really wanted the HtmlAnchor objects rather than the HtmlLink objects, then it is even easier: > > List anchorList = myPage.getAnchors(); > > Bruce > -- > Bruce Faulkner > SAS Institute Inc. > > -----Original Message----- > From: htm...@li... [mailto:htm...@li...] On Behalf Of Bruce Faulkner > Sent: Wednesday, September 01, 2004 8:23 AM > To: htm...@li... > Subject: RE: [Htmlunit-user] Getting all the Anchor (HTMLLinks) on a page? > > > Something like the following code should give what you need: > > List linkList = myPage.getDocumentElement().getHtmlElementsByTagName(HtmlLink.TAG_NAME); > Where myPage is an instance of an HtmlPage. > > Bruce > -- > Bruce Faulkner > SAS Institute Inc. > -----Original Message----- > From: htm...@li... [mailto:htm...@li...] On Behalf Of Robert Baccus > Sent: Tuesday, August 31, 2004 8:13 PM > To: htm...@li... > Subject: [Htmlunit-user] Getting all the Anchor (HTMLLinks) on a page? > > > I noticed that HTMLUnit has the HtmlPage.getFirstAnchorByText(String text) method. But what I am trying to accomplish is to parse the whole page and pull out all of the HTMLLinks and put them into a list. Can this easily be done? > > Thanks. > > ===== > Rob Baccus > Email: rb...@go... > > > > __________________________________ > Do you Yahoo!? > Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idP47&alloc_id808&op=ick > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_idP47&alloc_id808&op=click > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > |