modules/post/windows/gather/enum_unattend.rb
#
# Read and parse the XML file
#
Read and parse the XML file
Read and parse the XML file
def load_unattend(xml_path)
		print_status("Reading #{xml_path}")
		f = session.fs.file.new(xml_path)
		raw = ""
		until f.eof?
			raw << f.read
		end
		begin
			xml = REXML::Document.new(raw)
		rescue REXML::ParseException => e
			print_error("Invalid XML format")
			vprint_line(e.message)
			return nil, raw
		end
		return xml, raw
	end
def load_unattend ( xml_path ) print_status ( "Reading #{xml_path}" ) f = session . fs . file . new ( xml_path ) raw = "" until f . eof? raw << f . read end begin xml = REXML :: Document . new ( raw ) rescue REXML :: ParseException => e print_error ( "Invalid XML format" ) vprint_line ( e . message ) return nil , raw end return xml , raw end
Read and parse the XML file
Read and parse the XML file
xml_path
<not_specific>