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

XMLWriter::startAttributeNs

PHP function Edit on GitHub ✎

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

Create start namespaced attribute

Description

Oop

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

Procedural

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

Starts a namespaced attribute.

Parameters

prefix

The namespace prefix.

name

The attribute name.

namespace

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

Return Values

Success

Changelog

VersionDescription
8.0.0prefix is nullable now.

See Also

  • XMLWriter::startAttribute
  • XMLWriter::endAttribute
  • XMLWriter::writeAttribute
  • XMLWriter::writeAttributeNs

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