Hi,
I am trying to use set_inner_xml and then perl io to update a dcr. I ran a test of writing to a temp file and am able to do so. However, the actual dcr to which i am writing doesnt get updated. I dont get any errors though but it goes perfectly file when i do the logging.
Env- TS6.7.1 SP1, windows
Below is the piece of code if somebody can look:
[html]
----
opendir DIR, $catdir;
@files1 = readdir(DIR);
closedir DIR;
foreach (
@files1) {
$mcfile = $_;
if ( $mcfile eq "$selCat" ) {
open( FILE, "$catdir$mcfile" );
while () {
$codexmloutput1 .= $_;
}
close(FILE);
my $rootnode = TeamSite:

CRnode->new($codexmloutput1);
my
@modelList = $rootnode->get_node_list('modelCategoryModel');
my $counter = 0;
my $totalitems =
@modelList;
foreach my $models (
@modelList) {
$counter++;
if ( $counter == $totalitems ) {
$model_code = $models->value('modelCategoryModelId');
$models->set_inner_xml( 'modelCategoryModelId',
$model_code . $category_id );
$model_code = $models->value('modelCategoryModelId');
$logger->info( "model value is ", $model_code );
$modified_dcr = $rootnode->get_xml();
#$models->set_inner_xml( 'modelCategoryModelId',
# $model_code . $category_id );
$logger->info( "the xml set is ", $modified_dcr );
if ($modified_dcr ne '') {
$logger->debug("in if looop for modifying dcr->$catdir$mcfile ");
#open (MYFILE, ">$catdir$mcfile"); ##THIS DOESNT.. ****!
###THIS WRITES TO A TEST FILE
open (MYFILE, ">Y:/cpw-com/main/teamsite-development/development/bhasker/WORKAREA/bhasker/logs/test.txt");
$logger->debug("dcr opened for write..now printing");
print MYFILE " \n";
print MYFILE $modified_dcr;
$logger->debug("printed...");
close (MYFILE);
$logger->debug("file closed...");
----
[/html]
APPRECIATE QUICK RESPONSE
THANKS,
A