-
Notifications
You must be signed in to change notification settings - Fork 20
Query NextAll
Thomas Weinert edited this page Jul 30, 2014
·
1 revision
FluentDOM\Query nextAll([ string $selector = NULL ])
Find all sibling elements after the current element.
$html = <<<HTML
<html>
<head>
<title>Examples: FluentDOM\Query::nextAll()</title>
</head>
<body>
<div>first</div>
<div>sibling<div>child</div></div>
<div>sibling</div>
<div>sibling</div>
</body>
</html>
HTML;
echo FluentDOM($html)
->find('//div[position() = 1]')
->nextAll()
->addClass('after');
<?xml version="1.0"?>
<html>
<head>
<title>Examples: FluentDOM\Query::nextAll()</title>
</head>
<body>
<div>first</div>
<div class="after">sibling<div>child</div></div>
<div class="after">sibling</div>
<div class="after">sibling</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