DOMElement->setAttributeAdds new attribute
&reftitle.description;
DOMElementboolsetAttributestringnamestringvalue
Sets an attribute with name name to the given
value. If the attribute does not exist, it will be created.
Throws DOMException if node cannot be modified.
Setting an attribute
createElement("para");
$newnode = $doc->appendChild($node);
$newnode->setAttribute("align", "left");
?>
]]>
See also DOMElement->getAttribute()