title: Perl XML get element node using XML::LibXML
body: <p>I would like to replace the element node of my XML file, but I did not even succeed to get the node. My code below works for other child nodes but not the <code>id</code> node.</p>
  
  <p>Here is my XML file:</p>
  
  <pre><code>&lt;header&gt;
      &lt;idset id="100"&gt;                            
          &lt;a&gt;item_a&lt;/a&gt;
          &lt;b&gt;item_b&lt;/b&gt;
      &lt;/idset&gt;
  &lt;/header&gt;
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  use feature 'say';
  use XML::LibXML;
  
  my $file = 'test.xml';
  my $parser = XML::LibXML-&gt;new();
  my $doc = $parser-&gt;load_xml(location =&gt; $file);
  
  my($object11) = $doc-&gt;findnodes('/header/idset');
  say 'a: ',$object11-&gt;findvalue('./a');
  say 'b: ',$object11-&gt;findvalue('./b');
  say 'id: ',$object11-&gt;findvalue('./id');
  </code></pre>
  
  <p>Current Result:</p>
  
  <pre><code>a: item_a
  b: item_b
  id:
  </code></pre>
  
  <p>Expecting Result:</p>
  
  <pre><code>a: item_a
  b: item_b
  id: 100
  </code></pre>