public function xml(SimpleXMLElement $parent)
    {
        $option = $parent->addChild('option');
        $option->addAttribute('name', '--' . $this->_name);
        $short = '';
        if (strlen($this->_short) > 0) {
            $short = '-' . $this->_short;
        }
        $option->addAttribute('short', $short);
        $option->addAttribute('help', $this->_help);
        $option->addAttribute('boolean', (int)$this->_boolean);
        $option->addChild('default', $this->_default);
        $choices = $option->addChild('choices');
        foreach ($this->_choices as $valid) {
            $choices->addChild('choice', $valid);
        }

        return $parent;
    }