Sub discount(xmlFileName$ as String, itemsByIndex as object, itemsByTitle as Object, userVariables As Object)
	xml1 = CreateObject("roXMLElement")
	if not xml1.Parse(ReadAsciiFile(xmlfilename$)) then 
			print "xml read failed"
	else
				count=0
				For each item in xml1.discount
					itemsbyindex[count]=item.description.GetText()
					if count < 9 then count=count+1
					'itemsByTitle.AddReplace(item.description.GetText(), item.price.GetText())
				next

				if itemsbyindex.count() > count-1 then 
					'print "clearing end of list"
					for d=count+1 to itemsByindex.count()-1
						itemsbyindex[d]=" "
					next
				else
					print "No entries to erase"
				endif


		'DeleteFile(xmlfilename$)
		
	endif
	print itemsbyindex
	
end Sub
