title: How do I visualise/pretty-print a HTML DOM tree?
body: <p>Now that I can navigate a Web page via <a href="http://p3rl.org/WWW%3a%3aMechanize" rel="nofollow">WWW::Mechanize</a> and get information via <a href="http://p3rl.org/HTML%3a%3aTreeBuilder%3a%3aXPath" rel="nofollow">HTML::TreeBuilder::XPath</a> by accessing an id, I am left using <a href="http://getfirebug.com" rel="nofollow">Firebug</a> to read the DOM in order to discover the layout of the HTML tree.  The content that Mechanize captures is unstructured HTML, not good for human eyes.</p>
  
  <p>Is using Firebug to ascertain the id I am after a typical approach?  Once I get the id then I'm good to go, it's just that I've got several ids and pages with more ids to chase down and I was hoping to get (dump, print, etc.) a formatted layout of the DOM in order to make that discovery easier.  Though granted, Firebug makes it pretty easy, too.  I'm just wondering if I am missing an easier method.</p>
  
  <p><a href="http://www.perlmonks.org/?node_id=950196" rel="nofollow">Crossposted at PerlMonks.</a></p>