in reply to Re^9: Update XML Values using two primary keys
in thread Update XML Values using two primary keys
Thank you. Actually, my Hash Key is a combination of lat lon value like 53.58464144.8.560693391. I was trying to separate the lat lon value so that I can add new tags to my XML file with the lat and on value respectively.
I did the split part of lat and lon by using the split and join module.my @lat_lon_key = (split /[.]/, $key); my $lat_key = join('.', @lat_lon_key[0,1]); my $lon_key = join('.', @lat_lon_key[2,3]);
$VAR1 = { '53.58964145.8.560993391' => { 'name' => 'A99_984_KEI', 'id' => '-1643796' }, '53.58464146.8.560693392' => { 'id' => -1643795, 'name' => 'A88_984_KEI' } };
In the above Hash, if the 1st Hash key is present in the XML then it gets updated but if the 2nd Hash key is not present or rejected then it should get added as new tag in XML.
Now my problem is I am not getting the desired rejected HoH keys in my else part of the statement. What I have to do in else part to get the rejected HoH key and build a new node in XML with it?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Update XML Values using two primary keys
by hippo (Archbishop) on Jan 13, 2021 at 11:24 UTC | |
by pratikpooja (Novice) on Jan 13, 2021 at 20:18 UTC | |
by pratikpooja (Novice) on Jan 14, 2021 at 10:22 UTC |