Skip to content

Document CreateElement

Thomas Weinert edited this page Jul 12, 2018 · 3 revisions

FluentDOM\DOM\Document::createElement

FluentDOM\Element createElement(
  string $name [ , string $content = '' [ , array $attributes = NULL ]]
)
FluentDOM\Element createElement(
  string $name [ , array $attributes = NULL ]
)

Extends the DOMDocument::createElement() method. It fixes the entity bug for the $content argument and allows to provide an array of attributes, too.

It uses the namespaces registered on the document to resolve namespace prefixes.

Clone this wiki locally