public function asXML()
    {
        $p = new XMLElement('p', $this->message, array('role' => 'alert'));
        $p->setAttribute('class', 'notice');

        if ($this->type !== self::NOTICE) {
            $p->setAttribute('class', 'notice ' . $this->type);
        }

        return $p;
    }