getElementsByTagName('Errors'); //if there are error nodes if($errors->length > 0){ parent::printError($errors); } else { //no errors $this->process(); } } private function process(){ //get results nodes $responses = parent::getResponseDoc()->getElementsByTagName("CategoryArray")->item(0); //parent::printResponseData($responses); $this->Categories = parent::getResponseData($responses); $this->Categories = $this->Categories['Category']; } function getCategories(){ return $this->Categories; } } if(isset($_GET['cid'])){ print "
";
	$Categories = new GetCategoryInfo("CategoryID=".$_GET['cid']."&IncludeSelector=ChildCategories");
	var_dump($Categories->getCategories());
}

?>getElementsByTagName('Errors');
		//if there are error nodes
		if($errors->length > 0){
			parent::printError($errors);		
		} else { //no errors
			$this->process();
		}
	}
	
	private function process(){
		//get results nodes
    	$responses = parent::getResponseDoc()->getElementsByTagName("findItemsAdvancedResponse")->item(0);
        //parent::printResponseData($responses);
		$this->Response = parent::getResponseData($responses);
	}
	
	function getResponse(){
		return $this->Response;
	}
	
	function getItems(){
		return $this->Response["searchResult"]["item"];
	}
	
	function getPageNumber(){
		return $this->Response["paginationOutput"]["PageNumber"];
	}
	
	function getEntriesPerPage(){
		return $this->Response["paginationOutput"]["entriesPerPage"];
	}
	
	function getTotalPages(){
		return $this->Response["paginationOutput"]["totalPages"];
	}
	
	function getTotalItems(){
		return $this->Response["paginationOutput"]["totalEntries"];
	}
	
	
}


/*
if(isset($_GET['test'])){
	
	print "
";
	$mParam = array("descriptionSearch" => "true",
						"paginationInput.entriesPerPage" => "20",
						"paginationInput.pageNumber" => "1",
						"keywords" => "iphone 5s");
			if($this->gw_cid != ""){
				$mParam["categoryId"] = $this->gw_cid;
			}
			$findItems = new findItemsAdvanced($mParam);
	var_dump($findItems->getResponse());
}
*/
?>getElementsByTagName('Errors');
		//if there are error nodes
		if($errors->length > 0){
			//parent::printError($errors);
			$this->process();		
		} else { //no errors
			$this->process();
		}
	}
	
	private function process(){
		//get results nodes
    	$responses = parent::getResponseDoc()->getElementsByTagName("GetSingleItemResponse")->item(0);
        //parent::printResponseData($responses);
		$this->Response = parent::getResponseData($responses);
	}
	
	function getResponse(){
		return $this->Response;
		//return parent::getResponseData(parent::getResponseDoc());
	}
	
	function getItem(){
		
		return $this->Response["Item"];	
	}
	
	
	
}



/*if(isset($_GET['test'])){
	
   boolean 
   string 
   string 
  
   boolean 
   string 
   int 
   int 
   ProductIDType (string) 
   ProductSortCodeType 
   string 
   SortOrderCodeType 
	
	print "
";
	$GetSingleItem = new GetSingleItem("IncludeSelector=Details,Description,ItemSpecifics,ShippingCosts&ItemID=321333043940");
	var_dump($GetSingleItem->getItem());
}*/

?>