function fromXML($xmlElement)
    {
        foreach ($xmlElement->children() as $field) {
            $this->custom_fields[trim($field->name)] = $field->type; // The trim is required to make a safer string from the object
        }
    }