in reply to can't extract node with HTML::TreeBuilder::XPath

Meanwhile i solved the inconsistency. Further investigation yields for the xpath expression //table[1]/tr/td[2]/a/div/h3[\@class='sect2']. The reason of the error was that i relied to heavily on the output of 'XPath Helper' (a chrome extension). Is there any linux based browser which could help to extract a xpath of an website element correctly?

Replies are listed 'Best First'.
Re^2: can't extract node with HTML::TreeBuilder::XPath
by Corion (Patriarch) on Jul 29, 2012 at 19:35 UTC

    I find using CSS selectors or relative XPath expressions to be more wieldly. Anchoring the expression on a "nearby" element with an id attribute is usually sufficient to get a short XPath (or CSS) expression.