/* The node is not changed if it (or its first child) is not an integer node.  */
int mxmlSetInteger(mxml_node_t *node, int integer)
/* The node is not changed if it (or its first child) is not an integer node.  */
int mxmlSetInteger(mxml_node_t *node, int integer)
{
  if (node && node->type == MXML_ELEMENT &&
      node->child && node->child->type == MXML_INTEGER)
    node = node->child;
  if (!node || node->type != MXML_INTEGER)
    return (-1);
  node->value.integer = integer;
  return (0);
}