##
use XML::Simple;
my $xml = new XML::Simple (ForceArray => 1, KeepRoot => 1,KeyAttr=>[]);
my $data = $xml->XMLin($xmlfile);
my $Id = $data->{Profile}->[0]->{Application}->[0]->{Id};
my $CsID = (split(/\//, $Id))[-1];
$data->{Profile}->[0]->{Application}->[0]->{Id} = $CsID;
print $xml->XMLout($data);