- wfProfileOut( "$fname-setup" );
-
- wfProfileIn( "$fname-output" );
- if ($ot == 'php') {
- $navText .= makePhp($messages);
- $wgOut->addHTML('PHP | <a href="'.$wgTitle->escapeLocalUrl('ot=html').'">HTML</a><pre>'.htmlspecialchars($navText).'</pre>');
+ wfProfileOut( __METHOD__ . '-setup' );
+
+ wfProfileIn( __METHOD__ . '-output' );
+ if ( $ot == 'php' ) {
+ $navText .= makePhp( $messages );
+ $wgOut->addHTML( 'PHP | <a href="' . $wgTitle->escapeLocalUrl( 'ot=html' ) . '">HTML</a> | <a href="' . $wgTitle->escapeLocalUrl( 'ot=xml' ) . '">XML</a><pre>' . htmlspecialchars( $navText ) . '</pre>' );
+ } else if ( $ot == 'xml' ) {
+ $wgOut->disable();
+ header( 'Content-type: text/xml' );
+ echo makeXml( $messages );