2017 © Pedro Peláez
 

library sisyphus

PHP implementation of Canonical XML and Exclusive XML Canonicalization standards

image

bkon/sisyphus

PHP implementation of Canonical XML and Exclusive XML Canonicalization standards

  • Friday, May 2, 2014
  • by bkon
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

Sisyphus::C14N

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)

Use cases

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)

Dependencies

Runtime: PHP 5.1, (*6)

Development: ant, phpunit, phpmd, phpcs, hhvm and hhvm-wrapper, phpcpd, phpdoc., (*7)

PHP 5.3+

If your using PHP 5.2+ you won't need this package, but it's available as a composer package anyway., (*8)

composer install

Basic usage

$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)

Bitdeli Badge, (*9)

The Versions

02/05 2014

dev-master

9999999-dev

PHP implementation of Canonical XML and Exclusive XML Canonicalization standards

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

by Konstantin Burnaev