Hi Friends, I was trying to create multiple DCRs while saving an original dcr by copying its content in data folder with different names in perl script.i copied by perl file copying and after that i have renamed to requird dcr name.finally i set the iwextattr command. when i tried to edit the new dcr i am getting this error Root cause:Couldn't parse DCR bytes into DOM [unable_to_parse_dcr ]:The processing instruction target matching "[xX][mM][lL]" is not allowed.Details... com.interwoven.ui.formspub.datacapture.EditDCRPredicate$ReadDCRException: Couldn't parse DCR bytes into DOM [unable_to_parse_dcr ]:The processing instruction target matching "[xX][mM][lL]" is not allowed.The code is given below.pls let me know what is the problem ?open (WRITEDCR, ">$FinalRolebasedDCRName") or print STDERR "cannot open"; open(DCRFILE, "$DCRName"); my $DCRxmloutput; while(){ $DCRxmloutput .= $_; print WRITEDCR "$DCRxmloutput"; } close(WRITEDCR); close(DCRFILE); my $Scommand = $iwhome."/bin/iwextattr -g TeamSite/Templating/DCR/Type \"$DCRName\""; #`$iwhome/bin/iwextattr -g "TeamSite/Templating/DCR/Type \"$DCRName"`; chomp (my $result= `$Scommand 2>&1`); (my $EA = $DCRName) =~ s|.*templatedata/(.*?)/(.*?)/data/.*|$1/$2|i; $S2command = $iwhome."/bin/iwextattr -s TeamSite/Templating/DCR/Type=$EA \"$FinalRolebasedDCRName\""; chomp (my $result2= `$S2command 2>&1`);
Simply you can use copy command instead of reading the same dcr again and writing in to different file name unless you do some processing on the read content. Coming to your problem, try like this as[html]open(DCRFILE, "$DCRName");open (WRITEDCR, ">$FinalRolebasedDCRName") or print STDERR "cannot open";my $DCRxmloutput;select WRITEDCR; #Select/redirect where to write;while(){$DCRxmloutput .= $_;print WRITEDCR "$DCRxmloutput";}close(WRITEDCR);close(DCRFILE);[/html]