private Date parseDate(XPathExpression<Element> expression, Element element)
     throws ParseException {
   Element result = expression.evaluateFirst(element);
   if (result != null) {
     SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
     return dateFormat.parse(result.getText());
   } else {
     throw new IllegalArgumentException(
         "Could not evaluate [" + expression + "] on [" + element + "]");
   }
 }
 /** ************************************************************************* */
 public static Element selectElement(Document doc, String path) {
   XPathExpression<Element> expression =
       XPathFactory.instance().compile(path, new ElementFilter());
   return expression.evaluateFirst(doc);
 }