-
Notifications
You must be signed in to change notification settings - Fork 20
Query Not
Thomas Weinert edited this page Jul 30, 2014
·
1 revision
FluentDOM\Query not(string|callable $selector)
Removes elements matching the specified expression from the set of matched elements.
$html = <<<HTML
<html>
<head>
<title>Examples: FluentDOM\Query::not()</title>
</head>
<body>
<div> </div>
<div id="blueone"> </div>
<div> </div>
<div class="green"> </div>
<div class="green"> </div>
<div class="gray"> </div>
<div> </div>
</body>
</html>
HTML;
echo FluentDOM($html)
->find('//div')
->not('@class = "green" or @id = "blueone"')
->addClass('blue');
<?xml version="1.0"?>
<html>
<head>
<title>Examples: FluentDOM\Query::not()</title>
</head>
<body>
<div class="blue"> </div>
<div id="blueone"> </div>
<div class="blue"> </div>
<div class="green"> </div>
<div class="green"> </div>
<div class="gray blue"> </div>
<div class="blue"> </div>
</body>
</html>
- Home
- Getting Started
- Tasks
- Plugins
- Functions
- Lists
- Creator (5.1)
- CSS Selectors
- Convertors
- Loaders
- Serializers (5.1)
- Transformers (5.1)
- Extended DOM
- XMLReader (6.1)
- XMLWriter (6.1)
- Interfaces