chrisullyott/php-xml
最新稳定版本:v2.0.0
Composer 安装命令:
composer require chrisullyott/php-xml
包简介
XML-to-array conversion in PHP.
README 文档
README
XML-to-array conversion in PHP. Built for pulling items from a variety of RSS feeds.
Installation
With Composer:
$ composer require chrisullyott/php-xml
Usage
use ChrisUllyott\XmlParser; $parser = new XmlParser('path/to/feed.xml'); // or pass in a raw XML string $items = $parser->getItems(); print_r($items);
Each feed item and their child attributes are parsed into a flat structure:
(
[0] => Array
(
[title] => News for September the Second
[link] => http://example.com/2002/09/01/news-for-september-the-second
[guid] => 20020901-news-for-september-the-second
[guid_isPermaLink] => 0
[description] => Things happened today!
)
[1] => Array
(
[title] => News for September the First
[link] => http://example.com/2002/09/01/news-for-september-the-first
[guid] => 20020901-news-for-september-the-first
[guid_isPermaLink] => 0
[description] => Things happened today!
)
)
统计信息
- 总下载量: 319
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-24