/**
   * This method looks for an element in this DataObject. Why does this method exist? No external
   * class uses this! --Brian
   *
   * @param name Name of an element
   * @return boolean true if there is an element by that name, else false
   */
  protected boolean elementExists(String name) {
    //		int n = this.countChildren();
    boolean result = false;

    for (DataObject currentChild : this.getChildren()) {
      String currentName = currentChild.getName();

      if (currentName.equals(name)) {
        // sounds like we've found it
        result = true;
      }
      if (result == false) { // carry on searching the children
        if (currentChild.countChildren() > 0) {
          result = currentChild.elementExists(name);
        }
        if (result) { // did we find it?
          break; // then stop here
        }
      }
    }
    return result;
  }