This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change in a future release of PHP without notice. Be warned and use this function at your own risk.
Sets an attribute with name name of the given node on a value.
If we take the example from domxml_add_root() it is simple to add an attribute to the HEAD element by the simply calling the set_attribute() function of the node class.