2017 © Pedro Peláez
 

library zendxml

Utility library for XML usage, best practices, and security in PHP

image

zendframework/zendxml

Utility library for XML usage, best practices, and security in PHP

  • Monday, April 30, 2018
  • by zendframework
  • Repository
  • 15 Watchers
  • 23 Stars
  • 4,161,766 Installations
  • PHP
  • 33 Dependents
  • 1 Suggesters
  • 15 Forks
  • 3 Open issues
  • 6 Versions
  • 5 % Grown

The README.md

ZendXml

Repository abandoned 2019-12-31

This repository has moved to laminas/laminas-xml., (*1)

Build Status Coverage Status, (*2)

An utility component for XML usage and best practices in PHP, (*3)

Installation

You can install using:, (*4)

curl -s https://getcomposer.org/installer | php
php composer.phar install

Notice that this library doesn't have any external dependencies, the usage of composer is for autoloading and standard purpose., (*5)

ZendXml\Security

This is a security component to prevent XML eXternal Entity (XXE) and XML Entity Expansion (XEE) attacks on XML documents., (*6)

The XXE attack is prevented disabling the load of external entities in the libxml library used by PHP, using the function libxml_disable_entity_loader., (*7)

The XEE attack is prevented looking inside the XML document for ENTITY usage. If the XML document uses ENTITY the library throw an Exception., (*8)

We have two static methods to scan and load XML document from a string (scan) and from a file (scanFile). You can decide to get a SimpleXMLElement or DOMDocument as result, using the following use cases:, (*9)

use ZendXml\Security as XmlSecurity;

$xml = <<<XML
<?xml version="1.0"?>
<results>
    <result>test</result>
</results>
XML;

// SimpleXML use case
$simplexml = XmlSecurity::scan($xml);
printf ("SimpleXMLElement: %s\n", ($simplexml instanceof \SimpleXMLElement) ? 'yes' : 'no');

// DOMDocument use case
$dom = new \DOMDocument('1.0');
$dom = XmlSecurity::scan($xml, $dom);
printf ("DOMDocument: %s\n", ($dom instanceof \DOMDocument) ? 'yes' : 'no');

The Versions

30/04 2018

dev-develop

dev-develop

Utility library for XML usage, best practices, and security in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

xml security zf2 zendframework zf

30/04 2018

dev-master

9999999-dev

Utility library for XML usage, best practices, and security in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

xml security zf2 zendframework zf

30/04 2018

1.1.0

1.1.0.0

Utility library for XML usage, best practices, and security in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

xml security zendframework zf

04/02 2016

1.0.2

1.0.2.0 http://packages.zendframework.com/

Utility library for XML usage, best practices, and security in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

xml security zf2

03/08 2015

1.0.1

1.0.1.0 http://packages.zendframework.com/

Utility library for XML usage, best practices, and security in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

xml security zf2

05/03 2014

1.0.0

1.0.0.0 http://packages.zendframework.com/

Utility library for XML usage, best practices, and security in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

xml security zf2