XMLAHierarchy

To represent a single hierarchy, use the XMLAHierarchy data type. In this example code, the names of all hierarchies are printed that can be found through an XMLA connection:

#define EngineVersion 5.0
#define RuntimeVersion 5.0

void XmlaPrintHierarchies(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)
		    {
     			WriteLine("        Found hierarchy " + XMLAGetHierarchyName(hierarchy) + ".);
	    	}
		}
	}	
}