phoenyx-studio/parser
Composer 安装命令:
composer require phoenyx-studio/parser
包简介
Simple PHP-library for DOM to Object parsing
README 文档
README
Simple DOM to Object parser
Example application
Please, put this application in the folder named 'app' in the root of repository. Consult with .gitignore - it is ignored there
<?php
require dirname(__DIR__) . '/vendor/autoload.php';
$html = '<html>
<head>
<title>Parser test app</title>
</head>
<body>
<div class="content">
<h1>This is the header of test app</h1>
<ul>
<li>This is the first list item</li>
<li>This is the second list item</li>
<li>This is the third list item</li>
</ul>
</div>
</body>
</html>';
$parser = new PhoenyxStudio\Parser\FakeParser();
$parseResult = $parser->parse($html);
$doc = $parseResult->ejectObject();
foreach($doc->getListItems() as $listItem) {
echo $listItem . '<br>';
}
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-11-11