Help for this page

Select Code to Download


  1. or download this
    <?xml version="1.0" encoding="UTF-8"?>
    <contrib contrib-type="author">
    ...
        </name>
    </contrib>
    
  2. or download this
    my $xml;
    open (SOURCE, $source_file)
    ...
    close(SOURCE)
        or die "ERROR: Cannot close filehandle on $source_file: $!\n";
    print $xml;
    
  3. or download this
    my $xp = XML::XPath->new(xml => $xml)
        or die "ERROR: XML::XPath cannot parse target file: $!\n";
    ...
        my $surname     = $xp->find('./name/surname',     $contrib_node);
        print "CONTRIB: $given_names $surname\n";
    }