traversing hierarchy?

can anybody explain how to traverse through the nodes of a “skeleton”?

i have this so far which seems to get the root-node’s name(skeletonRootNodeName), but cant seem to get the rest of the joints…


int skeletonCount = database->getElementCount(0, COLLADA_ELEMENT_SKELETON);
for (i=0; i<skeletonCount; i++)
{
daeElement* element = 0;
database->getElement(&element, i, 0, COLLADA_ELEMENT_SKELETON);

domInstance_controller::domSkeleton* skeletonElement =
	daeSafeCast&lt;domInstance_controller::domSkeleton&gt;(element);

xsAnyURI uri = skeletonElement-&gt;getValue ();
daeString skeletonRootNodeName = uri.getID ();

}

Are the joints referenced by sid in a <Name_array>? If so you can use the daeSIDResolver class to find the elements. At the link above is an example of how to use daeSIDResolver to find a particular joint in a skeleton.