How to get attribute value from xpath result?


Please can somebody tell me how to access the ‘attributes’ once I’ve got the ‘results’ back as an array from the xpath query?
e.g. What do I put in place of the ??? in the following code.

results = loader.doXPath("//SomeExpr");
				for(var i=0; i<results.length; i++)


 //To access attribute 'Test' within results[i]

Thanks for your help