<?xml version="1.0"?>
<root>
<Arguments>
<apkName>Player
<testUseCase>PlayVideo</testUseCase>
<id>1</id>
<clipName>firstclip</clipName>
</apkName>
</Arguments>
</root>
I tried this code: but its not working and its keeping player name in new tag with name with content and order also changing ..
use XML::Simple;
my $xml_file = "test.xml";
my $xml = XMLin(
$xml_file,
KeepRoot => 1,
ForceArray => 1,
)
$xml->{root}->[0]->{Arguments}->[0]->{apkName}->[0]->{clipName}->[0] = 'secondclip';
XMLout(
$xml,
XMLDecl =>1,
KeepRoot => 1 ,
NoAttr => 1,
OutputFile => $xml_file,
);