@@ -100,6 +100,11 @@ public function buildContent($wrapper) {
100100 } else if ($ this ->_view == 'result ' ) {
101101 $ this ->appendSource ($ wrapper , $ this ->_output , 'xml ' );
102102
103+ } else if ($ this ->_view == 'raw ' ) {
104+ header ('Content-Type: application/xml ' );
105+ echo $ this ->_xml ;
106+ die ();
107+
103108 } else {
104109 if ($ _GET ['debug ' ] == $ this ->__relativePath ($ this ->_pagedata ['filelocation ' ])) {
105110 $ this ->appendSource ($ wrapper , @file_get_contents ($ this ->_pagedata ['filelocation ' ]), 'xsl ' );
@@ -127,9 +132,12 @@ protected function appendSource($wrapper, $source, $language = 'xml') {
127132 $ inner ->setAttribute ('id ' , 'source ' );
128133 $ wrapper ->appendChild ($ inner );
129134
130- $ viewXML = new XMLElement ('div ' ,null ,array ('id ' =>'type ' ,'class ' =>'raw ' ));
131- $ viewXML ->appendChild (new XMLElement ('span ' ,__ ('View as XML ' )));
132- $ wrapper ->appendChild ($ viewXML );
135+ if ($ this ->_view == 'xml ' ) {
136+ $ viewRaw = Widget::Anchor ('' ,'?debug=raw ' );
137+ $ viewRaw ->setAttribute ('id ' , 'type ' );
138+ $ viewRaw ->appendChild (new XMLElement ('span ' ,__ ('Plain XML ' )));
139+ $ wrapper ->appendChild ($ viewRaw );
140+ }
133141 }
134142
135143 protected function __buildParams ($ params ) {
0 commit comments