Re: [Htmlparser-user] How to handle <link> tag using HTML Parser ?
Brought to you by:
derrickoswald
From: Ian M. <ian...@gm...> - 2007-01-13 21:55:12
|
Unfortunately, the a tag is looked for by a class called LinkTag, which we can't just change for compatibility reasons. This means that we need to come up with a name for a tag that handles LINK elements that won't get confused with this tag. Suggestions are welcome :) Should you wish to parse this tag, you can always create such a tag yourself by extending CompositeTag (find another such tag to copy) and register it with the PrototypicalNodeFactory that you use. Ian On 1/13/07, li shuguang <lis...@gm...> wrote: > I don't think it can deal with that because the link tag does not appear in > the body. > > > > On 1/13/07, Pandian Annamalai < pan...@ya...> wrote: > > > > could someone throw lights on how to handle the <link> tag > > > > I want to extract the href value from the following html, > > > > <link rel="stylesheet" href="dummy11.css" type="text/css"/> > > > > I tried to use the LinkTag clas, > > > > NodeList linkTags = nodeList.extractAllNodesThatMatch(new > NodeClassFilter(LinkTag.class), true); > > NodeIterator nI = linkTags.elements(); > > > > but the filter recognizes only <a href="...."> tags... > > > > <link href=".." > are ignored. Any help here ? Appreciate your response. > > > > Regards, > > Pands > > > > > > ________________________________ > Now that's room service! Choose from over 150,000 hotels > > in 45,000 destinations on Yahoo! Travel to find your fit. > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > opinions on IT & business topics through brief surveys - and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > _______________________________________________ > > Htmlparser-user mailing list > > Htm...@li... > > > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > > > > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Htmlparser-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > > > |