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 want
Is there an other way round to do this? I mean,
HTML DOM Tree + The element you want => XPath expression
I know Mozilla extension allows to do this with GUI, but it's well known that the generated XPath is kinda bogus because it adds extra tbody etc. and useless when you don't use Gecko engine.
The module would share the concept with Template::Extract, which does creation of TT templates using stash variales and the generated output.
If anyone knows the prior work to do this, let me know. Otherwise I'll begin writing a module for it, to make using Web::Scraper much easier. It'd be nice to add to my YAPC::EU talk.
And yes, all problems regarding my flight and hotel in Vienna seem to be sorted and I'll be in. Yay!