private static XPathNodeIterator GetTestCasesWithErrors(string fileName) { XPathDocument doc = new XPathDocument(fileName); XPathNavigator nav = doc.CreateNavigator(); XPathExpression expr = nav.Compile("//case[errorStackTrace]"); XPathNodeIterator iterator = nav.Select(expr); return iterator; }