-
Notifications
You must be signed in to change notification settings - Fork 20
Element AppendElement
Thomas Weinert edited this page Aug 1, 2014
·
5 revisions
FluentDOM\Element appendElement(string $name [ , string $content = '' [ , array $attributes = NULL ]])
A shortcut to create, configure an append an element node.
$dom = new FluentDOM\Document();
$dom->appendChild($dom->createElement('div'));
$dom->documentElement->appendElement(
'span', 'Hello World!', ['class' => 'message']
);
echo $dom->saveXML();<?xml version="1.0" encoding="UTF-8"?>
<div><span class="message">Hello World!</span></div>- 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