create_attribute method

create_attribute

This method creates a new attribute node, and returns it. The object created is a node implementing the Attr class. The DOM does not enforce what sort of attributes can be added to a particular element in this manner.

Returns

A Attr node.

def create_attribute(self, local_name):
    ...
ParameterTypeDescription
local_namestris a string containing the name of the attribute.

See Also