HTML::TreeBuilder ã®ã¡ã½ãããè¦ããã«ã¯äººçã¯ã¿ããããã件ã«ã¤ã㦠HTML::TreeBuilder ã® ->lookup ã ã® ->find ã ã®ãè¦ããã®ã¯ãå¦ç¿ã®å¹çããããªããã¤ã¶ãããããªãã®ã§ããã£ã¨ä¸è¬ç㪠CSS Selector ã XPath ãªã©ãè¦ãã¦ããããã¤ãã£ãæ¹ããå¾ã§ããã¨ãããã HTML::TreeBuilder 㧠XPath ãå©ç¨ããã«ã¯ãHTML::TreeBuilder::XPath ãã¤ã³ã¹ãã¼ã«ããã°ããããã㯠pure perl ãªã®ã§å®¹æã«å©ç¨ã§ããã my $tree = HTML::TreeBuilder::XPath->new; $tree->parse($content); my @items = $tree->findnodes(q{//*[@id='topicsfb']//li}); print $
{{#tags}}- {{label}}
{{/tags}}