Re: [Htmlparser-user] xpath
Brought to you by:
derrickoswald
From: Ian M. <ian...@gm...> - 2007-01-16 13:32:50
|
To make font tags hold children: - make your own font tag (copy the existing one is the easiest) but make it extend compositetag instead of just tag. - unregister the old font tag from the prototypicalnodefactory then register your new one with it. This isn't done by default because HTML documents can be horribly malformed, especially where tags like FONT are concerned! Ian On 1/16/07, Kalyan K Kumar <kal...@gm...> wrote: > I'm trying to implement these two xpath methods in htmlparser. > > public String getElementXPath(Node element); > public Node getElementByXpath(String xpath); > > xpath will look something like > html/body/div/div[2[/div2/ul/li/a[3] > > The problem I'm facing is , some tags like font,center are not treated as > parents. > which is clearly mentioned in this thread > http://sourceforge.net/mailarchive/message.php?msg_id=15467503 > > is there any way to include every tag ? > Is some implementation of xpath already existing ? > > Thanks > Kalyan > > > > > ------------------------------------------------------------------------- > 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 > > > |