my $conf = "/home/ember/devices/$Macaddress/$Macaddress.xml"; # create object my $xml = XMLin ($conf, KeepRoot=>1,); # insert element $xml->{dut}{ipaddress} = "$ipaddress"; $xml->{dut}{macaddress} = "$Macaddress"; $xml->{dut}{model} = "$ProdShortName"; $xml->{dut}{frimware} = "$Firmware_Version"; # convert Perl array ref into XML document print XMLout($xml);
In reply to Re^2: XML::Simple add
by hakana
in thread XML::Simple add
by hakana
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |