ixml/src/node.c
static IXML_Document *ixmlNode_newDoc(void)
{
	IXML_Document *newDoc;
	IXML_Node *docNode;
	int rc;

	newDoc = (IXML_Document *)malloc(sizeof (IXML_Document));
	if (!newDoc)
		return NULL;
	ixmlDocument_init(newDoc);
	docNode = (IXML_Node *)newDoc;
	rc = ixmlNode_setNodeName(docNode, DOCUMENTNODENAME);
	if (rc != IXML_SUCCESS) {
		ixmlDocument_free(newDoc);
		return NULL;
	}
	newDoc->n.nodeType = eDOCUMENT_NODE;

	return newDoc;
}
/*!
 * \brief Returns a new document node.
 *
 * Currently, the IXML_Document struct is just a node, so this function
 * just mallocs the IXML_Document, sets the node type and name.
 *
 * \return A new document node.
 */
\brief Returns a new document node.
Currently, the IXML_Document struct is just a node, so this function
just mallocs the IXML_Document, sets the node type and name.

\return A new document node.
\ brief Returns a new document node . Currently the IXML_Document struct is just a node so this function just mallocs the IXML_Document sets the node type and name . \ return A new document node .
static IXML_Document *ixmlNode_newDoc(void)
{
	IXML_Document *newDoc;
	IXML_Node *docNode;
	int rc;
	newDoc = (IXML_Document *)malloc(sizeof (IXML_Document));
	if (!newDoc)
		return NULL;
	ixmlDocument_init(newDoc);
	docNode = (IXML_Node *)newDoc;
	rc = ixmlNode_setNodeName(docNode, DOCUMENTNODENAME);
	if (rc != IXML_SUCCESS) {
		ixmlDocument_free(newDoc);
		return NULL;
	}
	newDoc->n.nodeType = eDOCUMENT_NODE;
	return newDoc;
}
static IXML_Document * ixmlNode_newDoc ( void ) { IXML_Document * newDoc ; IXML_Node * docNode ; int rc ; newDoc = ( IXML_Document * ) malloc ( sizeof ( IXML_Document ) ) ; if ( ! newDoc ) return NULL ; ixmlDocument_init ( newDoc ) ; docNode = ( IXML_Node * ) newDoc ; rc = ixmlNode_setNodeName ( docNode , DOCUMENTNODENAME ) ; if ( rc != IXML_SUCCESS ) { ixmlDocument_free ( newDoc ) ; return NULL ; } newDoc -> n . nodeType = eDOCUMENT_NODE ; return newDoc ; }
\brief Returns a new document node.
\ brief Returns a new document node .