hobnob/xml-stream-reader 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hobnob/xml-stream-reader

最新稳定版本:v1.0.8

Composer 安装命令:

composer require hobnob/xml-stream-reader

包简介

PHP SAX XML Stream Reader

关键字:

README 文档

README

Build Status Dependency Status Latest Stable Version Montly Downloads

Code Coverage Scrutinizer Quality Score SensioLabsInsight

##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 with Composer

Declare xmlStreamReader as a dependency in your projects composer.json file:

{
    "require": {
      "hobnob/xml-stream-reader": "1.0.*"
    }
}

Usage Example

<?php

$xmlParser = new \Hobnob\XmlStreamReader\Parser();

$xmlParser->registerCallback(
    '/xml/node/path',
    function( \Hobnob\XmlStreamReader\Parser $parser, \SimpleXMLElement $node ) {
        // do stuff with $node
    }
);

$xmlParser->registerCallback(
    '/xml/node/@attr',
    function( \Hobnob\XmlStreamReader\Parser $parser, $attrValue ) {
        // do stuff with $attrValue
    }
);

$xmlParser->parse(fopen('file.xml', 'r'));

Contributors

Licence

© David North

Released under the The MIT License

统计信息

  • 总下载量: 187.99k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 47
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 47
  • Watchers: 9
  • Forks: 16
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-03-21