Modules like HTML::TreeBuilder::XPath and HTML::Selector::XPath is very useful to extract content from HTML DOM tree using XPath expressions or CSS selectors. These modules do the following:HTML DOM Tree + XPath expression => The element you wantIs there an other way round to do this? I mean,HTML DOM Tree + The element you want => XPath expressionI know Mozilla extension allows to do this with GUI