public String getText(String elementPath) {
      String[] path = toPathArray(elementPath);
      NodeList nodes = doc.getElementsByTagName(path[0]);
      Element element = (Element)nodes.item(0);
      for(int i=1; i < path.length; i++) {
         if (element == null) return null;
         nodes = element.getElementsByTagName(path[i]);
         element = (Element)nodes.item(0);
      }
      return getSimpleText((Element)nodes.item(0));
   }