http://www.perlmonks.org?node_id=1102985


in reply to HTML::TreeBuilder::XPath returns things I don't need?

The <title> tag is valid in the <head> only in HTML. The parser tries to fix the misplaced titles for you, try dumping $tree to see how.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: HTML::TreeBuilder::XPath returns things I don't need?
by szabgab (Priest) on Oct 06, 2014 at 15:58 UTC
    I see. I tried it inside the body with elements in different locations and it worked as I expected. Thanks.