importation from node type name

I have a class that controls the importation and a class that imports data from collada collada with Dom.
I would structure my collada importer to scroll through the scene and , each node would like to see what kind of node is: light, mesh, etc. … controller and call the import functions that are in the control class.
In this class, depending on the type of node called the Import function found on, for example Importlight (), ImportMesh (), Importcontroller ().
Only it did not succeed.
This is the test code:

bool CColladaSkinMeshImporter::ImportSceneNode(string* strID, string* strIDParent, bool* bISJoint, DX_POSITION* pos, int* pNNodeType)	
	if(m_CurrentNode->getType() == NODETYPE_NODE )
		int n =m_CurrentNode->getElementType();
		switch(	m_CurrentNode->getType()){
				*pNNodeType = MESH_MY;
				*pNNodeType = MESH_MY;
				 *pNNodeType = SKELETON_MY;
			return true;
	return false;

I saw that you could also count the number of instances of a node and import with a switch on the panel, would work equally, but I would do one thing clear: how can I “control” the import depending on the type of node?
Thank you.

You can’t do it that way because your assumption doesn’t hold.

A node element is not a typed object to switch on, rather it’s a place defined by its local coordinate system. Also, node can contain any number of instances. You can try iterating over the list of instances and switching on their type.