I want to replace a "VAL1" value of an element in xml file
For some reason it does not work for me:
<testing>
<application_name>TEST</application_name>
<application_id>VAL1</application_id>
<application_password>1234</application_password>
</testing>
my $parser =XML::LibXML->new();
$tree =$parser->parse_file($xml);
$root =$tree->getDocumentElement;
my ($elem)=$root->findnodes('/testing/application_id');
$elem->setValue('VAL2');
The errror is get is "Can't locate object method "setValue" via package "XML::LibXML::Element..."