public function toXml()
    {
        $this->parse();
        $doc = new DomDocument('1.0', 'utf-8');
        $optionsNode = $doc->createElement('options');
        $doc->appendChild($optionsNode);
        foreach ($this->_options as $flag => $value) {
            $optionNode = $doc->createElement('option');
            $optionNode->setAttribute('flag', utf8_encode($flag));
            if ($value !== true) {
                $optionNode->setAttribute('parameter', utf8_encode($value));
            }
            $optionsNode->appendChild($optionNode);
        }
        $xml = $doc->saveXML();
        return $xml;
    }
public function toXml()
    {
        $this->parse();
        $doc = new DomDocument('1.0', 'utf-8');
        $optionsNode = $doc->createElement('options');
        $doc->appendChild($optionsNode);
        foreach ($this->_options as $flag => $value) {
            $optionNode = $doc->createElement('option');
            $optionNode->setAttribute('flag', utf8_encode($flag));
            if ($value !== true) {
                $optionNode->setAttribute('parameter', utf8_encode($value));
            }
            $optionsNode->appendChild($optionNode);
        }
        $xml = $doc->saveXML();
        return $xml;
    }
public function toXml ( ) { $ this -> parse ( ) ; $ doc = new DomDocument ( '1.0' , 'utf-8' ) ; $ optionsNode = $ doc -> createElement ( 'options' ) ; $ doc -> appendChild ( $ optionsNode ) ; foreach ( $ this -> _options as $ flag => $ value ) { $ optionNode = $ doc -> createElement ( 'option' ) ; $ optionNode -> setAttribute ( 'flag' , utf8_encode ( $ flag ) ) ; if ( $ value !== true ) { $ optionNode -> setAttribute ( 'parameter' , utf8_encode ( $ value ) ) ; } $ optionsNode -> appendChild ( $ optionNode ) ; } $ xml = $ doc -> saveXML ( ) ; return $ xml ; }
Return the current set of options and parameters seen in XML format.

@return string
Return the current set of options and parameters seen in XML format .