#!/usr/bin/perl use 5.010; use strict; use warnings; use XML::LibXML; my $filename = 'webrtcc_system_static_config_data_platremoved.xml'; my $a; my $dom = XML::LibXML->load_xml(location => $filename); my $book = $dom->documentElement; my $del="tmmTableFilenameMap"; my @a = $book->findnodes("tmmTableFilenameMap"); $book->removeChild($a); print $book->serialize();