I've alread saw this question and answer but I wasn't able to use it.
This is my code:
//Get grandparents of MyRefNode
$GrandParents = $MyXml->xpath('//MyRefNode/../..');
//Loop grandparents
foreach ($GrandParents as $GrandParent){
//Count each GrandParent's children
$count = $GrandParent->count();
echo '<br/> Children count = '.$count;
//Get GrandParent's Tag name **NOT WORKING**
$TName = $GrandParent->xpath('./name()')
echo '<br/> Tag Name = '.$TName;
}