/* The node is not changed if it is not an element node.  */
int mxmlSetElement(mxml_node_t *node, const char *name)
/* The node is not changed if it is not an element node.  */
int mxmlSetElement(mxml_node_t *node, const char *name)
{
  if (!node || node->type != MXML_ELEMENT || !name)
    return (-1);
  if (node->value.element.name)
    free(node->value.element.name);
  node->value.element.name = strdup(name);
  return (0);
}