This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/DomCrawler/README.md

22 lines
510 B
Markdown
Raw Normal View History

DomCrawler Component
====================
2011-11-03 20:26:29 +00:00
If you are familiar with jQuery, DomCrawler is a PHP equivalent.
It allows you to navigate the DOM of an HTML or XML document:
```
use Symfony\Component\DomCrawler\Crawler;
$crawler = new Crawler();
$crawler->addContent('<html><body><p>Hello World!</p></body></html>');
print $crawler->filterXPath('descendant-or-self::body/p')->text();
```
Resources
---------
Unit tests:
https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/DomCrawler