Tôi muốn thay thế một "VAL1" giá trị của một phần tử trong tập tin xmlXML :: LibXML thay thế giá trị phần tử
Đối với một số lý do nó không làm việc cho tôi:
<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');
Các errror là có được là "Không thể định vị phương thức đối tượng" setValue "qua gói" XML :: LibXML :: Element ... "
Cảm ơn! Làm việc của nó –