filtns - strip all but tags in a certain namespace from a file
filtns -n NamespaceURI [-s SystemId_DTD] [-p PublicID] [-t tags] [file.xml]
This program strips all tags from a file which do not belong to the namespace specified with -n. The NamespaceURI argument is mandatory (alternately it can be supplied using the XMLNS environment variable).
If a -s flag is specified, a DOCTYPE declaration will be added to the output with the specified SystemID.
If a -p flag is specified, a DOCTYPE declaration will be added with the specified PublicID. A SystemID must also be specified in this case.
If a -t flag is specified, it is a list (quoted to protect from the shell) of tags that should have newlines output after their closing tags. The default list is:
If a file is not specified, input is taken from stdin.
Generated output is sent to stdout, in UTF8.
XML::Filter::Namespace(3).
Dominic Mitchell <cpan@semantico.com>
@(#) $Id: filtns,v 1.3 2002/12/04 14:30:46 dom Exp $
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install XML::Filter::Namespace, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Filter::Namespace
CPAN shell
perl -MCPAN -e shell install XML::Filter::Namespace
For more information on module installation, please visit the detailed CPAN module installation guide.