Attr createAttribute(String name) throws DOMException;
name
The name for the newly created attribute.
A newly created Attr node with its nodeName property set to name.
This method throws a DOMException with a code of INVALID_CHARACTER_ERR if name contains an illegal character.
Attr, Element.setAttribute( ), Element.setAttributeNode( )