php8.5
Home/ Manual/ xmlwriter / xmlwriter/ XMLWriter::writeAttributeNs

XMLWriter::writeAttributeNs

PHP function Edit on GitHub ✎

(PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL xmlwriter >= 0.1.0)

Write full namespaced attribute

Description

Oop

XMLWriter::writeAttributeNs(string|null $prefix, string $name, string|null $namespace, string $value): bool

Procedural

xmlwriter_write_attribute_ns(XMLWriter $writer, string|null $prefix, string $name, string|null $namespace, string $value): bool

Writes a full namespaced attribute.

Parameters

prefix

The namespace prefix. If prefix is null, the namespace will be omitted.

name

The attribute name.

namespace

The namespace URI. If namespace is null, the namespace declaration will be omitted.

value

The attribute value.

Return Values

Success

Changelog

VersionDescription

See Also

  • XMLWriter::writeAttribute
  • XMLWriter::startAttribute
  • XMLWriter::startAttributeNs
  • XMLWriter::endAttribute

Source: reference/xmlwriter/xmlwriter/writeattributens.xml · from the official PHP manual (php/doc-en)