# Strip namespace from child tags. Set default namespace, let # child tags inherit from it. So ghetto that we even have to do this # and LibXML can't on its own. my $normalize_ns = sub { my $str = shift; $str =~ s/(<\w+)\s+xmlns="\Q$ns\E"/$1/og; $str =~ s/// if $opts->{'single_entry'}; return $str; };