← All docs

xmlwriter_write_element()

Writes a complete element.

xmlwriter_write_element()

function xmlwriter_write_element(mixed $writer, string $name, ?string $content = null): bool

Writes a complete element.

Parameters:

  • $writer (mixed)
  • $name (string)
  • $content (?string), default null, optional

Returns: bool

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how xmlwriter_write_element is implemented in the compiler, see the internals page.