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):
    ...
Parameter Type Description
namespace_uri str The attribute namespace URI.
qualified_name str The attribute qualified name.
value str The attribute value.

See Also