The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

filtns - strip all but tags in a certain namespace from a file

SYNOPSIS

  filtns -n NamespaceURI [-s SystemId_DTD] [-p PublicID] [-t tags] [file.xml]

DESCRIPTION

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:

p

If a file is not specified, input is taken from stdin.

Generated output is sent to stdout, in UTF8.

SEE ALSO

XML::Filter::Namespace(3).

AUTHOR

Dominic Mitchell <cpan@semantico.com>

VERSION

@(#) $Id: filtns,v 1.3 2002/12/04 14:30:46 dom Exp $

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.