bavix/advanced-html-dom 问题修复 & 功能扩展

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

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

bavix/advanced-html-dom

最新稳定版本:1.1.0

Composer 安装命令:

composer require bavix/advanced-html-dom

包简介

Bavix Advanced HTML DOM.

README 文档

README

Scrutinizer Code Quality Code Coverage Build Status Code Intelligence Status

Package Rank Latest Stable Version Latest Unstable Version License composer.lock

  • Vendor: bavix
  • Package: Advanced HTML DOM
  • Version: Latest Stable Version
  • PHP Version: 7.1+
  • Composer: composer require bavix/advanced-html-dom

The goal of this project is to be a DOM-based drop-in replacement for PHP's simple html dom library.

How To Use - The same way as simple. If you use file/str_get_html then you don't need to change anything. If you are instantiating with new simple_html_dom() then you will need to change that to new AdvancedHtmlDom()

What's Different - Mostly just formatting (spaces) in the html. This is added by DOM and there's no way around it. Some non-standard selectors have been dropped but many more standard ones have been added. For example: img[src!=foo] was removed because it's not a valid selector. Added are things like a + b and a ~ b or even a.foo:not(.bar)

What's Better

  • 10x-20x Performance increase
  • Reduced memory requirement
  • Support for many more css selectors

Features

  • Supports full set of css pseudo selectors plus many jquery extras: :not, :has, :contains, :gt, :lt, :eq
  • Use with css or xpath: $doc->find('h3 a'), $doc->find('//h3//a')
  • Jquery-style functions replace, wrap, unwrap, before after
  • Nodeset math: $doc->find('a')->minus($doc->find('.skip_me'))
  • Lots of stuff that even BeautifulSoup and Nokogiri can't do: $doc->search('span:lt(7):not(.foo)')
  • Lots more features that haven't been documented yet.

How to install it via composer

composer req bavix/advanced-html-dom

统计信息

  • 总下载量: 760
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 31
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-13