Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StreamReader Collection

PHP XML Stream Reader

Reads XML from either a string or a stream, allowing the registration of callbacks when an elemnt is found that matches path.

Installation

  • Install Zephir
  • zephir build
  • Add extension=streamparser to your php.ini

Usage Example

<?php
declare(strict_types = 1);

$handle = \fopen(__DIR__ . 'games.xml', 'rb');

(new SixDreams\StreamReader\XmlStreamReader())
    ->registerCallback('/root/sport', '/root/sport/groups/group/events/event', function (string $rawXml) {
        echo 'XML: ' . $rawXml . "\n";
    })
    ->parse($handle);

\fclose($handle);

PHP JSON Stream Reader

@todo...

About

Stream Reader as php extension

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages