Hi..
We are in process of modifying existing DCR structure to new one.
OLD dct has :-
Container and some Container fields.
New DCT has
4 Containers and some fields in container.
I have re-structured fields in DCT and new changes are working fine. I have already made FormAPI changes and Data deploy changes. New changes are working fine.
But when I open an existing DCR, existing values are not there.. and thats understandable as xpath of the existing path have changed.
If I open a existing DCR in xml format, in perl, I could get all the old values. I need to take these values and migrate these values in new dcr fields and re-structure my DCT.
I used following piece of code for modified existing value of the DCR node
my $dcr_xml = "";
## Opening the file in XML Format
if (!open(XML, "$dcr")) {
print DEBUG "Cannot Open DCR: $dcr ";
}
if (open(XML, "$dcr")) {
$dcr_xml = join "", ;
}
close(XML);
## Printing before modifying
print DEBUG "Before : $dcr_xml \n";
my $rootnode = TeamSite::XMLnode->new($dcr_xml);
print DEBUG "RN : $rootnode \n";
my
@obj_info;
my $link = "";
@obj_info = $rootnode->get_node_list('object_details');
## Modifying Inner XML
$rootnode->set_inner_xml('object_details.object_desc_cont.widgets', 'text123' );
my $xml_string3 = $rootnode->get_xml();
## Printing After Modification
print DEBUG "After : $xml_string3 \n";
I can see the modified value in xml_strung3, but when I open a DCR in Editplus, I got old value. My changes are not reflected, or not saved.
Is there any way by which I can save the modified xml in DCR / replace existing xml and save it to dcr.
Also please send me a sample code to add a new node in xml file set the values to new node.
I used iwupdate command to update the DCR, after setting inner text value and I got error message as
my $cmd = "$iwhome/bin/iwupdate -r -w $dcr_vpath $dcr_vpath";
Error :--
ERROR:02401: File or directory is the same as the other version
Please reply..
Thanks
Vinit