attribute

abstract fun attribute(namespace: String?, name: String, prefix: String?, value: String)(source)

Write an attribute.

Parameters

namespace

The namespace of the attribute. null and "" will both resolve to the empty namespace.

name

The local name of the attribute (CName, must exclude the prefix).

prefix

The prefix to use. Note that in XML for attributes the prefix is empty/null when the namespace is and vice versa.

value

The value of the attribute