From: Teo K. L. <teo...@ho...> - 2003-03-25 08:48:17
|
<blur> can you please provide some partial code describing the solution using XPath? > --__--__-- > > Message: 6 > Date: Mon, 24 Mar 2003 08:55:37 -0500 > From: Mike Bowler <mb...@Ga...> > Organization: Gargoyle Software > To: htm...@li... > Subject: Re: [HtmlUnit] How to get htmltable without table id? > > Christian Sell wrote: > > this raises a question I have had on my mind for a while: > > > > what about specifying elements via XPath? There are XPath > > implementations around that can operate on a standard DOM, so if that > > was accessible (I didnt find it in Htmlunit, but must be around > > somewhere), one could point to any elements via XPath. There are even > > free graphical tools available to create XPath expressions from a web page. > > If I recall correctly, all you need for xpath is a starting node and the > xpath statement itself. You can get the xml node from any HtmlElement > by calling the getElement() method. This can then be used as the > starting element. > > -- > Mike Bowler > Principal, Gargoyle Software Inc. > Voice: (416) 822-0973 | Email : mb...@Ga... > Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |