library/core/class.controller.php
protected function _RenderXml($Data, $Node = 'Data', $Indent = '') {
      // Handle numeric arrays.
      if (is_numeric($Node))
         $Node = 'Item';

      if (!$Node)
         return;
      
      echo "$Indent<$Node>";

      if (is_scalar($Data)) {
         echo htmlspecialchars($Data);
      } else {
         $Data = (array)$Data;
         if (count($Data) > 0) {
            foreach ($Data as $Key => $Value) {
               echo "\n";
               $this->_RenderXml($Value, $Key, $Indent.' ');
            }
            echo "\n";
         }
      }
      echo "</$Node>";
   }
protected function _RenderXml($Data, $Node = 'Data', $Indent = '') {
      // Handle numeric arrays.
      if (is_numeric($Node))
         $Node = 'Item';

      if (!$Node)
         return;
      
      echo "$Indent<$Node>";

      if (is_scalar($Data)) {
         echo htmlspecialchars($Data);
      } else {
         $Data = (array)$Data;
         if (count($Data) > 0) {
            foreach ($Data as $Key => $Value) {
               echo "\n";
               $this->_RenderXml($Value, $Key, $Indent.' ');
            }
            echo "\n";
         }
      }
      echo "</$Node>";
   }
protected function _RenderXml ( $ Data , $ Node = 'Data' , $ Indent = '' ) { // Handle numeric arrays. if ( is_numeric ( $ Node ) ) $ Node = 'Item' ; if ( ! $ Node ) return ; echo "$Indent<$Node>" ; if ( is_scalar ( $ Data ) ) { echo htmlspecialchars ( $ Data ) ; } else { $ Data = ( array ) $ Data ; if ( count ( $ Data ) > 0 ) { foreach ( $ Data as $ Key => $ Value ) { echo "\n" ; $ this -> _RenderXml ( $ Value , $ Key , $ Indent . ' ' ) ; } echo "\n" ; } } echo "</$Node>" ; }
A simple default method for rendering xml.

@param mixed $Data The data to render. This is usually $this->Data.
@param string $Node The name of the root node.
@param string $Indent The indent before the data for layout that is easier to read.
A simple default method for rendering xml .