original_string: public function xml($string = true)
      {
          $parser = $this->_parser;
          $xml = new SimpleXMLElement('<shell></shell>');
          $xml->addChild('command', $parser->getCommand());
          $xml->addChild('description', $parser->getDescription());
  
          $subcommands = $xml->addChild('subcommands');
          foreach ($parser->subcommands() as $command) {
              $command->xml($subcommands);
          }
          $options = $xml->addChild('options');
          foreach ($parser->options() as $option) {
              $option->xml($options);
          }
          $arguments = $xml->addChild('arguments');
          foreach ($parser->arguments() as $argument) {
              $argument->xml($arguments);
          }
          $xml->addChild('epilog', $parser->getEpilog());
  
          return $string ? $xml->asXML() : $xml;
      }
code: public function xml($string = true)
      {
          $parser = $this->_parser;
          $xml = new SimpleXMLElement('<shell></shell>');
          $xml->addChild('command', $parser->getCommand());
          $xml->addChild('description', $parser->getDescription());
  
          $subcommands = $xml->addChild('subcommands');
          foreach ($parser->subcommands() as $command) {
              $command->xml($subcommands);
          }
          $options = $xml->addChild('options');
          foreach ($parser->options() as $option) {
              $option->xml($options);
          }
          $arguments = $xml->addChild('arguments');
          foreach ($parser->arguments() as $argument) {
              $argument->xml($arguments);
          }
          $xml->addChild('epilog', $parser->getEpilog());
  
          return $string ? $xml->asXML() : $xml;
      }
code_tokens: public function xml ( $ string = true ) { $ parser = $ this -> _parser ; $ xml = new SimpleXMLElement ( '<shell></shell>' ) ; $ xml -> addChild ( 'command' , $ parser -> getCommand ( ) ) ; $ xml -> addChild ( 'description' , $ parser -> getDescription ( ) ) ; $ subcommands = $ xml -> addChild ( 'subcommands' ) ; foreach ( $ parser -> subcommands ( ) as $ command ) { $ command -> xml ( $ subcommands ) ; } $ options = $ xml -> addChild ( 'options' ) ; foreach ( $ parser -> options ( ) as $ option ) { $ option -> xml ( $ options ) ; } $ arguments = $ xml -> addChild ( 'arguments' ) ; foreach ( $ parser -> arguments ( ) as $ argument ) { $ argument -> xml ( $ arguments ) ; } $ xml -> addChild ( 'epilog' , $ parser -> getEpilog ( ) ) ; return $ string ? $ xml -> asXML ( ) : $ xml ; }
docstring: Get the help as an xml string.
  
  @param bool $string Return the SimpleXml object or a string. Defaults to true.
  @return string|\SimpleXMLElement See $string
docstring_tokens: Get the help as an xml string .