public function createAttributeWithValue($attributeName, $value) { $attribute = $this->DOMDocument->createAttribute($attributeName); $attribute->value = $value; return $attribute; }