Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Jul 10, 2024 via composer

symfony/dom-crawler v7.0.4

Eases DOM navigation for HTML and XML documents
Package summary
Share
0
issues
1
license
4
MIT
Package created
16 Oct 2011
Version published
12 Feb 2024
Maintainers
1
Total deps
4
Direct deps
3
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
4 Packages, Including:
masterminds/html5@2.9.0
symfony/dom-crawler@v7.0.4
symfony/polyfill-ctype@v1.30.0
symfony/polyfill-mbstring@v1.30.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of symfony/dom-crawler 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
masterminds/html52.9.0-MIT
prod
symfony/polyfill-ctypev1.30.0-MIT
prod
symfony/polyfill-mbstringv1.30.0-MIT
prod

Visualizations

Frequently Asked Questions

What does symfony/dom-crawler do?

The Symfony/Dom-Crawler is a powerful utility that enables swift and comfortable navigation for HTML and XML documents. With this, developers can traverse node trees, inspect elements, extract data, and manipulate content efficiently, making it a vital tool for web data mining and scraping projects.

How do you use symfony/dom-crawler?

Using Symfony/Dom-Crawler is pretty straightforward. First of all, you will need to install composer package in your PHP project by running this command:

composer require symfony/dom-crawler

Once the package is installed, you can utilize it in your PHP code. A basic example might look like this:

<?php

use Symfony\Component\DomCrawler\Crawler;

$html = '<html>... your html ...</html>';
$crawler = new Crawler($html);

// Access elements using CSS Selectors
$titleElement = $crawler->filter('h1.title');
$title = $titleElement->text();

echo 'The title is: '. $title;

In this example, we initially create a Crawler object with your HTML document as the input. Here we're using filter() method to find the h1.title HTML element in the document, then extracting the contained text.

Where are the symfony/dom-crawler docs?

For advanced usage and comprehensive understanding of Symfony/Dom-Crawler, refer to their official documentation. This resource provides an in-depth breakdown of what the component offers - from installation to the various methods available for DOM manipulation and navigation. It is a handy reference when integrating Symfony/Dom-Crawler into your web development projects.