protected function genHierarchy($xml){
        if (!$xml){
            return false;
        }
        $a = array();
        $a['ProductCategoryId'] = (string)$xml->ProductCategoryId;
        $a['ProductCategoryName'] = (string)$xml->ProductCategoryName;
        if ($xml->Parent){
            $a['Parent'] = $this->genHierarchy($xml->Parent);
        }
        return $a;
    }