foreach($obj->categoryList->category as $category) {
     echo $category->id . ' - ' . $category->name;
}