code: protected function getPathFromPolygon(SimpleXMLElement $polygon){
  
  		$points = $this->getValuesFromList($polygon['points']);
  		$path = 'M'.array_shift($points).' '.array_shift($points);
  		while(count($points)){
  			$path .= 'L'.array_shift($points).' '.array_shift($points);
  		}
  		return $path.'Z';
  
  	}
docs: converts a polygon object to a SVG path definition
  
  @param  SimpleXMLElement $polygon polygon element
  @return string                    SVG path definition