def printChildElements( element, indent = 0 )

      indentation = ""
      indent.times{ indentation << " " } if indent > 0

      if element and element.is_a?( REXML::Element ) and element.has_elements?

         attributes = getAttributeString( element )
         name = lookupFieldName( element )
         puts "#{indentation}#{name} #{attributes}:"

         element.each { |element|
            if element.is_a?( REXML::Element ) and element.has_elements?
               printChildElements( element, (indent+1) )
            elsif element.is_a?( REXML::Element ) and element.has_text?
               attributes = getAttributeString( element )
               name = lookupFieldName( element )
               text = formatFieldValue( element.text, lookupFieldType( element ) )
               puts " #{indentation}#{name} #{attributes} = #{text}"
            end
         }
      elsif element and element.is_a?( Array )
         element.each{ |e| printChildElements( e ) }
      end
      self
   end
def printChildElements( element, indent = 0 )

      indentation = ""
      indent.times{ indentation << " " } if indent > 0

      if element and element.is_a?( REXML::Element ) and element.has_elements?

         attributes = getAttributeString( element )
         name = lookupFieldName( element )
         puts "#{indentation}#{name} #{attributes}:"

         element.each { |element|
            if element.is_a?( REXML::Element ) and element.has_elements?
               printChildElements( element, (indent+1) )
            elsif element.is_a?( REXML::Element ) and element.has_text?
               attributes = getAttributeString( element )
               name = lookupFieldName( element )
               text = formatFieldValue( element.text, lookupFieldType( element ) )
               puts " #{indentation}#{name} #{attributes} = #{text}"
            end
         }
      elsif element and element.is_a?( Array )
         element.each{ |e| printChildElements( e ) }
      end
      self
   end
Recursive method to print a simplified (yaml-like) tree of the XML returned by QuickBase.
 Translates field IDs into field names.
 Very useful during debugging.