$new->addChild($features); my $filename = 'new.xml'; my $ok = $new->toFile($filename,2);