Perl XML::Twig Copying without children -


is possible use somthing like

my $nodecopy = $node->copy(); 

without copying children? can't find on page on cpan it. maybe i'm missing something?

nevermind, found way. going leave here if ever else looks similar. have use cut_children. did this:

my $nodecopy = $node->copy();       #copy node $nodecopy->paste('before', $node);  #paste node $node->cut_children();             #remove children original node 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -