-
Notifications
You must be signed in to change notification settings - Fork 20
Query After
Thomas Weinert edited this page Jul 29, 2014
·
1 revision
FluentDOM\Query after(string|array|\DOMNode|\DOMNodeList|\Traversable|callable $content);
Insert content after each of the matched elements.
$xml = <<<XML
<html>
<head>
<title>Examples: FluentDOM\Query::after()</title>
</head>
<body>
<p>I would like to say: </p>
</body>
</html>
XML;
require_once('../vendor/autoload.php');
echo FluentDOM($xml)
->find('//p')
->after('<b>Hello</b>')
->after(' World');
<?xml version="1.0"?>
<html>
<head>
<title>Examples: FluentDOM\Query::after()</title>
</head>
<body>
<p>I would like to say: </p><b>Hello</b> World
</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