Hi All,
I want to parse all the existing DCR in my workarea and replace all the paths within a DCR starting with /bbsccms/(.*) to /bplacms/(.*).
I am using the below code to do so.
my $destFile = "$temp_dir"; # this variable holds the DCR path
open(FILE,"<:encoding(UTF-8)", "$temp_dir");
binmode FILE, ":utf8";
my
@file_content=;
close(FILE);
my $line;
my
@mod_content;
my $i=0;
foreach $line(
@file_content){
$line =~ s|(.*)(/bbsccms/)(.*)|$1/bplacms/$3|g;
$mod_content[$i]=$line;
$i++;
}
my $rootnode = TeamSite:

CRnode->new(
@mod_content);
my $newDCR = $rootnode->get_dcr();
open(FILEWRITE, "> $temp_dir") || die " Failed to open $temp_dir for write ($!) n";
print FILEWRITE $newDCR;
close FILEWRITE;
When i try to open the edit the DCR from teamsite i get the below error
Couldn't parse DCR bytes into DOM [unable_to_parse_dcr ]:Attribute name "Security" associated with an element type "item" must be followed by the ' = ' character.
I compared the orignal DCR and the new DCR and found that the new DCR seems to have corrupted.
I have uploaded rge orignal and the modified DCR.
Request someone to please let me know where am i going wrong?
Thanks
Manish