XML::Compile::C14N - XML Canonicalization
my $schema = XML::Compile::Cache->new(...); my $c14n = XML::Compile::C14N->new(schema => $schema);
XML canonicalization is used to enforce an explicit formatting style on de XML documents. It is required to have a reproducable output when, for instance, digital signatures gets applied to parts of the document.
C14N currently has seen three versions: 1.0, 1.1, and 2.0. Versions 1.* need [C14N-EXC] version 1.0. There is no support for version 2.0 in XML::LibXML yet, so also not provided by this module.
There can be more than one C14N object active in your program.
-Option --Default for undef schema undef version '1.1'
[0.92] When a canonicallization METHOD is provided, that will be used to automatically detect the C14N version to be loaded.
Add the C14N extension information to the provided schema. If not used, you have to call loadSchemas() before compiling readers and writers.
Explicitly state which version C14N needs to be used. C14N2 is not yet supported. If not specified, it is first attempted to derive the version from the 'for' option.
Returns the version number.
The $type is one of the C14* constants defined in XML::Compile::C14N::Util. The $node is an XML::LibXML::Element. Returned is a normalized byte-sequence, for instance to be signed.
-Option --Default context <created from NODE if needed> prefix_list [] xpath undef
Then prefixes which are to be included in normalization, only used in excludeNamespaces (EXC) normalizations.
Only normalize a subset of the document.
Load the C14N schema to the global $schema, which must extend XML::Compile::Cache.
This method will be called when you provide a value for new(schema). Otherwise, you need to call this when the global $schema is known in your program.
http://www.w3.org/TR/xml-c14n, 15 March 2001
http://www.w3.org/TR/xml-exc-c14n/, 18 July 2002
http://www.w3.org/TR/xml-c14n11/, 2 May 2008
http://www.w3.org/TR/xml-c14n2/, 24 January 2012
This module is part of XML-Compile-C14N distribution version 0.95, built on January 15, 2020. Website: http://perl.overmeer.net/xml-compile/
Copyrights 2011-2020 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/
To install XML::Compile::C14N, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Compile::C14N
CPAN shell
perl -MCPAN -e shell install XML::Compile::C14N
For more information on module installation, please visit the detailed CPAN module installation guide.