def validate()
       failed = []
        
        @loaded_schema['sections'].each{
          |section|
          
          #check required sections are there
          if (section['required'] && !@loaded_file.has_key?(section['name']))
            @errors.push('Error: missing required section - ' + section['name'])
            failed.push(section['name'])
          elsif @loaded_file.has_key?(section['name'])
            node = @loaded_file[section['name']]
            validated = match_node(node,section,section['name'])
            if(!validated)
              failed.push(section['name'])
            end
          end
               
        }
        
        result = {}       
        result["result"] = failed.empty?
        
        if !failed.empty? && !@errors.empty?
          result["errors"] = @errors
        end
        
        return result
      end
def validate()
       failed = []
        
        @loaded_schema['sections'].each{
          |section|
          
          #check required sections are there
          if (section['required'] && !@loaded_file.has_key?(section['name']))
            @errors.push('Error: missing required section - ' + section['name'])
            failed.push(section['name'])
          elsif @loaded_file.has_key?(section['name'])
            node = @loaded_file[section['name']]
            validated = match_node(node,section,section['name'])
            if(!validated)
              failed.push(section['name'])
            end
          end
               
        }
        
        result = {}       
        result["result"] = failed.empty?
        
        if !failed.empty? && !@errors.empty?
          result["errors"] = @errors
        end
        
        return result
      end
Creates a new *Validator* instance
 Validates the file against the schema