Xpath not found wen using selenium
===

i was working on  test automation . so i was googling facebook and wanted to get the links in a array list.So in my program i open up www.google.com use firefox web driver then enter facebook in search bar and then try to scan the page.i am able to open the browser and the page with facebook in search field 
but wen i use List<String> linksWOSpace=Arrays.asList(selenium.getAttribute("//li/div/h3/a"));
its throwing me an error  that string index out of bounds -1
its basically not able to get the elements by that xpath 
 