# File lib/rest_test.rb, line 281 def validate_xml xml, schema_file tmp = Tempfile.new('rest_test_validator') tmp.print xml tmp_path = tmp.path tmp.close found_schema_file = XmlFile.find_file schema_file if ( !found_schema_file ) out " Unable to find schema file '#{schema_file}'" return false end cmd = "/usr/bin/xmllint --noout --schema #{found_schema_file} #{tmp_path} 2>&1" # puts "CMD: " + cmd output = `#{cmd}` if $?.exitstatus > 0 out "xmllint return value: #{$?.exitstatus}" out output return false end return true end