- 授权协议: 未知
- 开发语言: PHP
- 操作系统: 跨平台
- 软件首页: https://github.com/bupt1987/html-parser
- 软件文档: https://github.com/bupt1987/html-parser
- 官方下载: https://github.com/bupt1987/html-parser
软件介绍
php html解析工具,类似与PHP Simple HTML DOM Parser。 由于基于php模块tidy,所以在解析html时的效率比 PHP Simple HTML DOM Parser 快2倍多。 并提供广度优先查询find()和深度优先查询find2() 两种查询方式,可根据自己的情况选择使用。 因为代码实现的问题,在查询全部时深度优先比广度优先快一点。
示例代码:
<?php
$html = '<html>
<head>
<title>test</title>
</head>
<body>
<p class="test_class test_class1">p1</p>
<p class="test_class test_class2">p2</p>
<p class="test_class test_class3">p3</p>
<div id="test1">测试1</div>
</body>
</html>';
$html_dom = new HtmlParserModel();
$html_dom->parseStr($html);
$p_array = $html_dom->find('p.test_class');
$p1 = $html_dom->find('p.test_class1',0);
$div = $html_dom->find('div#test1',0);
foreach ($p_array as $p){
echo $p->getPlainText();
}
echo $div->getPlainText();
echo $p1->getPlainText();
echo $pi->class;
?>
Spring揭秘
王福强 / 人民邮电出版社 / 2009.8 / 99.00元
没有教程似的训导,更多的是说故事般的娓娓道来,本书是作者在多年的工作中积累的第一手Spring框架使用经验的总结,深入剖析了Spring框架各个模块的功能、出现的背景、设计理念和设计原理,揭开了Spring框架的神秘面纱,使你“知其然,更知其所以然”。每部分的扩展篇帮助读者活学活用Spring框架的方方面面,同时可以触类旁通,衍生出新的思路和解决方案。 本书内容全面,论述深刻入理,必将成为每......一起来看看 《Spring揭秘》 这本书的介绍吧!
