Non repeating random numbers, how to?

I am going to make a quiz. It loads questions from an XML. I want to load random questions from the file without repetition. How can I achieve that? Can you give me the script for generating non-repeating random numbers.