title: XML::LibXML: doc - root
body: <p>Is the here the call of <code>documentElemtent</code> in the first example superfluous?</p>
  
  <pre><code>#!/usr/bin/env perl
  use warnings;
  use strict;
  use XML::LibXML;
  </code></pre>
  
  <hr>
  
  <pre><code>my $file = 'xml_file';
  
  my $doc = XML::LibXML-&gt;load_xml( location =&gt; $file );
  my $root = $doc-&gt;documentElement();
  my $xpc = XML::LibXML::XPathContext-&gt;new( $root );
  # ...
  say $_-&gt;nodeName for $xpc-&gt;findnodes( '/' );
  </code></pre>
  
  <p>outputs</p>
  
  <pre><code>#document
  </code></pre>
  
  <hr>
  
  <pre><code>$doc = XML::LibXML-&gt;load_xml( location =&gt; $file );
  $xpc = XML::LibXML::XPathContext-&gt;new( $doc );
  # ...
  say $_-&gt;nodeName for $xpc-&gt;findnodes( '/' );
  </code></pre>
  
  <p>outputs also</p>
  
  <pre><code>#document
  </code></pre>