setAttributeNS

fun setAttributeNS(namespace: String?, qualifiedName: String, value: String)(source)

setAttributeNS adds a new attribute or changes the value of an attribute with the given namespace and name.

MDN Reference