imarc/pluck

A simple CSS driven DOMDocument wrapper

Maintainers

Details

github.com/imarc/pluck

Source

Issues

Installs: 80

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 26

Forks: 0

Open Issues: 1

pkg:composer/imarc/pluck

dev-master / 1.x-dev 2015-11-16 19:56 UTC

This package is auto-updated.

Last update: 2025-09-29 01:44:28 UTC


README

A DOM CSS selector engine

Installation

Pluck uses Symfony's CSS-Selector for converting CSS selectors to XPath queries. Please ensure you have this package available. If you're using composer your standard composer install should fetch it as a requirement.

Usage

$html = <<<EOD
<!DOCTYPE html>
<html>
  <body>
		<a class="button" href="#">Hello There</a>
	</body>
</html>
EOD;

$dom = new Pluck\Document($html);
$dom->find('a.button')->remove();

To Do

  • Finish Documentation
  • Write Tests

Credits

  • While this library does not try to mimic jQuery, it will surely always be inspired by it.