Sets the attribute node by name.
Use this method to set an attribute of the node. Previous value is searched by name. If the node is found, it is replaced with NewAttr and returned. If no node is found, NewAttr is added to the list and null/nil/Nothing is returned.