Good morning,
Setup: Teamsite 6.5 - SP2 - Windows 2000 Server
I'm trying to crawl through a newly created DCR and set all the values to "". An example of the formatted xml (DCR) that is being crawled is attached to this post.
I read the perlDoc on XMLnode and XMLparser and then fiddled with it. I have the following code that I'm working with and have a small issue.
my
@nodelist= $rootnode->get_node_list('RootContainer.*');
setNodes(
@nodelist);
sub setNodes{
my (
@nodes) =
@_;
foreach my $node (
@nodes) {
$node->set_inner_xml("");
my
@childNodes = $node->get_node_list('*');
if (
@childNodes > 0){
setNodes(
@childNodes);
}
}
}
The set_inner_xml works great. Too great in fact. As I loop down into the xml, it will set to "" and then come back up. It then hits and puts that to "" as well. Thus removing the tag. The value() method is good for returning and the only other function that I can see that sets values is set_attrib which is for attributes (as you can see I don't have any).
A quick suggestion from those more learned in this field than I?
Thanks!
/FF