private function appendAttributes($node, $content = NULL, array $attributes = NULL)
{
if (is_array($content)) {
$attributes = NULL === $attributes ? $content : array_merge($content, $attributes);
}
if (!empty($attributes)) {
foreach ($attributes as $attributeName => $attributeValue) {
$node->setAttribute($attributeName, $attributeValue);
}
}
}