createElement($name, $value); foreach ($attributes as $name => $value) { $node->setAttribute($name, $value); } return $node; } }