code: public XElement add(String name) {
          XElement result = new XElement(name);
          result.parent = this;
          children.add(result);
          return result;
      }
docs: Add a new child element with the given name.
  @param name the element name
  @return the created XElement