set_attribute_ns method

set_attribute_ns(namespace_uri, qualified_name, value)

Adds a new attribute. If an attribute with the same local name and namespace URI is already present on the element, its prefix is changed to be the prefix part of the qualifiedName, and its value is changed to be the value parameter.

def set_attribute_ns(self, namespace_uri, qualified_name, value):
    ...
ParameterTypeDescription
namespace_uristrThe attribute namespace URI.
qualified_namestrThe attribute qualified name.
valuestrThe attribute value.

See Also