ixml/src/node.c
static IXML_Node *ixmlNode_cloneTextNode(
	/*! [in] The \b Node to clone. */
	IXML_Node *nodeptr)
{
	IXML_Node *newNode = NULL;
	int rc;

	assert(nodeptr != NULL);

	newNode = (IXML_Node *)malloc(sizeof (IXML_Node));
	if (newNode == NULL) {
		return NULL;
	} else {
		ixmlNode_init(newNode);
		rc = ixmlNode_setNodeName(newNode, nodeptr->nodeName);
		if (rc != IXML_SUCCESS) {
			ixmlNode_free(newNode);
			return NULL;
		}
		rc = ixmlNode_setNodeValue(newNode, nodeptr->nodeValue);
		if (rc != IXML_SUCCESS) {
			ixmlNode_free(newNode);
			return NULL;
		}
		newNode->nodeType = eTEXT_NODE;
	}

	return newNode;
}
/*!
 * \brief Returns a clone of nodeptr.
 *
 * \return A cloned node of nodeptr.
 */
\brief Returns a clone of nodeptr.
\return A cloned node of nodeptr.
\ brief Returns a clone of nodeptr . \ return A cloned node of nodeptr .
static IXML_Node *ixmlNode_cloneTextNode(
	IXML_Node *nodeptr)
{
	IXML_Node *newNode = NULL;
	int rc;
	assert(nodeptr != NULL);
	newNode = (IXML_Node *)malloc(sizeof (IXML_Node));
	if (newNode == NULL) {
		return NULL;
	} else {
		ixmlNode_init(newNode);
		rc = ixmlNode_setNodeName(newNode, nodeptr->nodeName);
		if (rc != IXML_SUCCESS) {
			ixmlNode_free(newNode);
			return NULL;
		}
		rc = ixmlNode_setNodeValue(newNode, nodeptr->nodeValue);
		if (rc != IXML_SUCCESS) {
			ixmlNode_free(newNode);
			return NULL;
		}
		newNode->nodeType = eTEXT_NODE;
	}
	return newNode;
}
static IXML_Node * ixmlNode_cloneTextNode ( IXML_Node * nodeptr ) { IXML_Node * newNode = NULL ; int rc ; assert ( nodeptr != NULL ) ; newNode = ( IXML_Node * ) malloc ( sizeof ( IXML_Node ) ) ; if ( newNode == NULL ) { return NULL ; } else { ixmlNode_init ( newNode ) ; rc = ixmlNode_setNodeName ( newNode , nodeptr -> nodeName ) ; if ( rc != IXML_SUCCESS ) { ixmlNode_free ( newNode ) ; return NULL ; } rc = ixmlNode_setNodeValue ( newNode , nodeptr -> nodeValue ) ; if ( rc != IXML_SUCCESS ) { ixmlNode_free ( newNode ) ; return NULL ; } newNode -> nodeType = eTEXT_NODE ; } return newNode ; }
\brief Returns a clone of nodeptr.
\ brief Returns a clone of nodeptr .
/*! [in] The \b Node to clone. */