using KeyAttr => 'tc' to read the xmlfile and tried something like:<exec> <tc id="001.001" version=""> </tc> </exec>
Is there a better way to find the specific tc (id) of interest? How shall I add the other attributes to that item?foreach my $tc (@{$xml->{tc}}) { if ($tc->{id} eq '001.001') { $xml->{tc}{version => '...'}; }; } }
In reply to XML::Simple find and add by hakana
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |