dev-master
9999999-devPHP implementation of Canonical XML and Exclusive XML Canonicalization standards
The Requires
- php >=5.3.0
The Development Requires
by Konstantin Burnaev
PHP implementation of Canonical XML and Exclusive XML Canonicalization standards
This library provides a pure-PHP implementation of the following standards: * Canonical XML Version 1.0 (http://www.w3.org/TR/xml-c14n) * Exclusive XML Canonicalization Version 1.0 (http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/), (*2)
Consider using this library if you need XML canonicalization on the legacy PHP versions (PHP 5.1.x). If you work with PHP 5.2+, you already have libxml-based canonicalization functionality available as DOMNode::C14n()., (*3)
PHP 5.1 as a target platform means we don't have access to nice features, like namespaces, lambdas or composer. Don't blame be if this code looks outdated to you. :), (*4)
Note that you can easily migrate from pure-PHP implementation to Lixml-based one when you upgrade your infrastructure by simply replacing Sisyphus_C14n_Legacy with Sisyphus_C14n_Libxml., (*5)
Runtime: PHP 5.1, (*6)
Development: ant, phpunit, phpmd, phpcs, hhvm and hhvm-wrapper, phpcpd, phpdoc., (*7)
If your using PHP 5.2+ you won't need this package, but it's available as a composer package anyway., (*8)
composer install
$service = new Sisyphus_C14n_Legacy(); $service ->withComments(false) ->exclusive(true) ->query('//n1:element') ->namespaces(array('n1' => 'http://n1.example.com')) ->inclusiveNamespaces(array('n1')); $outputString = $service->canonicalize($xmlDocument)
PHP implementation of Canonical XML and Exclusive XML Canonicalization standards