ixml/src/node.c
static BOOL ixmlNode_allowChildren(
	/*! [in] The \b Node to check. */
	IXML_Node *nodeptr,
	/*! [in] The child \b Node to check. */
	IXML_Node *newChild)
{
	assert(nodeptr != NULL && newChild != NULL);

	switch (nodeptr->nodeType) {
	case eATTRIBUTE_NODE:
	case eTEXT_NODE:
	case eCDATA_SECTION_NODE:
		return FALSE;

	case eELEMENT_NODE:
		switch (newChild->nodeType) {
		case eATTRIBUTE_NODE:
		case eDOCUMENT_NODE:
			return FALSE;
		default:
			break;
		}
	break;

	case eDOCUMENT_NODE:
		switch (newChild->nodeType) {
		case eELEMENT_NODE:
			break;
		default:
			return FALSE;
		}

	default:
		break;
	}

	return TRUE;
}
/*!
 * \brief Check to see whether nodeptr allows children of type newChild.    
 *
 * \return
 * 	\li TRUE, if nodeptr can have newChild as children.
 * 	\li FALSE, if nodeptr cannot have newChild as children.
 */
\brief Check to see whether nodeptr allows children of type newChild.
\return
\li TRUE, if nodeptr can have newChild as children.
\li FALSE, if nodeptr cannot have newChild as children.
\ brief Check to see whether nodeptr allows children of type newChild . \ return \ li TRUE if nodeptr can have newChild as children . \ li FALSE if nodeptr cannot have newChild as children .
static BOOL ixmlNode_allowChildren(
	IXML_Node *nodeptr,
	IXML_Node *newChild)
{
	assert(nodeptr != NULL && newChild != NULL);
	switch (nodeptr->nodeType) {
	case eATTRIBUTE_NODE:
	case eTEXT_NODE:
	case eCDATA_SECTION_NODE:
		return FALSE;
	case eELEMENT_NODE:
		switch (newChild->nodeType) {
		case eATTRIBUTE_NODE:
		case eDOCUMENT_NODE:
			return FALSE;
		default:
			break;
		}
	break;
	case eDOCUMENT_NODE:
		switch (newChild->nodeType) {
		case eELEMENT_NODE:
			break;
		default:
			return FALSE;
		}
	default:
		break;
	}
	return TRUE;
}
static BOOL ixmlNode_allowChildren ( IXML_Node * nodeptr , IXML_Node * newChild ) { assert ( nodeptr != NULL && newChild != NULL ) ; switch ( nodeptr -> nodeType ) { case eATTRIBUTE_NODE : case eTEXT_NODE : case eCDATA_SECTION_NODE : return FALSE ; case eELEMENT_NODE : switch ( newChild -> nodeType ) { case eATTRIBUTE_NODE : case eDOCUMENT_NODE : return FALSE ; default : break ; } break ; case eDOCUMENT_NODE : switch ( newChild -> nodeType ) { case eELEMENT_NODE : break ; default : return FALSE ; } default : break ; } return TRUE ; }
\brief Check to see whether nodeptr allows children of type newChild.
\ brief Check to see whether nodeptr allows children of type newChild .
/*! [in] The \b Node to check. */ /*! [in] The child \b Node to check. */