/** * @param SimpleXMLElement $xml * * @return Characteristic */ public static function createFromXML(SimpleXMLElement $xml) { /* <characteristic displayValue="Basic (0-500 EUR)" value="1" name="Insurance range code"/> */ $attributes = $xml->attributes(); $option = new self(); $option->setDisplayValue($attributes['displayValue']); $option->setValue($attributes['value']); $option->setName($attributes['name']); return $option; }