code: private static HashMap<String, String> getGroupDefinitions(Element e) {
          HashMap<String, String> groups = new HashMap<String, String>();
          Elements children = e.getChildElements();
          for (int i = 0; i < children.size(); i++) {
              Element child = children.get(i);
              if (child.getQualifiedName().equals("group")) {
                  String id = child.getAttributeValue("id").trim();
                  String smarts = child.getValue().trim();
                  groups.put(id, smarts);
              }
          }
          return groups;
      }
docs: /*
  find all <group> elements that are directly under the supplied element so
  this wont recurse through sub elements that may contain group elements