Correct me if I am wrong: You should getting an IllegalArgumentException.
1. Think of this, when i=0, what string will you get from xPath.evaluate("StartDate", nodes.item(i))? And, what will you get...