code: public static Attachment getAttachment(Element attachment) {
  
      Namespace ns = attachment.getNamespace();
  
      Attachment att = new Attachment();
      att.setAlternateId(attachment.getChildText(ATTACHEMENT_ID_ELEMENT, ns));
      att.setLabel(attachment.getChildText(ATTACHEMENT_LABEL_ELEMENT, ns));
      att.setCapGroupName(attachment.getChildText(CAP_GROUP_NAME_ELEMENT, ns));
      att.setCapGroupSMILES(attachment.getChildText(CAP_GROUP_SMILES_ELEMENT, ns));
  
      return att;
    }
docs: Convert ATTACHMENT element to Attachment object
  
  @param attachment element
  @return Attachment