XMLAMember

To represent a single XMLA hierarchy member, use the XMLAMember data type. This example code prints the names of all members of all hierarchies that belong to an XMLA connection:

#define EngineVersion 5.0
#define RuntimeVersion 5.0

void XmlaPrintMemberList(XMLAConnection connection)
{
	XMLACubeList cubes = XMLAGetCubeList(connection);
	foreach (XMLACube cube in cubes)
	{
		XMLADimensionList dimensions = XMLAGetDimensionList(cube);
		WriteLine("Found cube " + XMLAGetCubeName(cube) + ". It has " + Count(dimensions) + " dimensions.");		
		foreach (XMLADimension dimension in dimensions)
		{
			XMLAHierarchyList hierarchies = XMLAGetHierarchyList(dimension);
			WriteLine("    Found dimension " + XMLAGetDimensionName(dimension) + ". It has " + Count(hierarchies) + " hierarchies.");
			foreach (XMLAHierarchy hierarchy in hierarchies)
		    {
			    XMLAMemberList members = XMLAGetMemberList(hierarchy);			    
     			WriteLine("        Found hierarchy " + XMLAGetHierarchyName(hierarchy) + ". It has " + Count(members) + " members.");
                foreach (XMLAMember member in members)
    		    {					
    			    XMLAMemberList subMembers = XMLAGetMemberList(member);			    
     			    WriteLine("            Found member " + XMLAGetMemberName(member) + ".");    			    
     			    foreach (XMLAMember subMember in subMembers)
    		        {
    			        WriteLine("                Found member " + XMLAGetMemberName(subMember) + ".");
            	    }
            	}
	    	}
		}
	}	
}