in reply to Re^3: Update an XML node value based on one of the attribute values.
in thread Update an XML node value based on one of the attribute values.
when i use $node ->setData("xyz"); i again get the same error. Please excuse my ignorance, i am very new to perl scripting.use strict; use warnings; use XML::LibXML 2; my $doc = 'XML::LibXML'->load_xml(IO => \*DATA); foreach my $node ( $doc->findnodes('//ReferenceID') ) { $node->firstChild->setData("Reference ID type is $node->{reference +IDType}") if $node->{referenceIDType} eq 'FXDD'; } print $doc->toString;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Update an XML node value based on one of the attribute values.
by Laurent_R (Canon) on Apr 18, 2014 at 13:27 UTC |