code: public void copyFrom(XNElement other) {
          content = other.content;
          userObject = other.userObject;
          for (Map.Entry<XAttributeName, String> me : other.attributes.entrySet()) {
              XAttributeName an = new XAttributeName(me.getKey().name, me.getKey().namespace, me.getKey().prefix);
              attributes.put(an, me.getValue());
          }
          for (XNElement c : children) {
              XNElement c0 = c.copy();
              c0.parent = this;
              children.add(c0);
          }
      }
docs: Copy the attributes and child elements from the other element.
  @param other the other element