class Plant implements Serializable {

  private String name;
  private String type;

  /**
   * Provides XML Representation of the Plant.
   *
   * @param xmlDoc to which the XML representation is to be written to
   * @return XML Element contain the Animal representation
   */
  public Element toXmlElement(Document xmlDoc) {<FILL_FUNCTION_BODY>}

  /**
   * Parses the Plant Object from the input XML Node.
   *
   * @param node the XML Node from which the Animal Object is to be parsed
   */
  public void createObjectFromXml(Node node) {
    NamedNodeMap attributes = node.getAttributes();
    name = attributes.getNamedItem("name").getNodeValue();
    type = attributes.getNamedItem("type").getNodeValue();
  }

  @Override
  public String toString() {
    StringJoiner stringJoiner = new StringJoiner(",");
    stringJoiner.add("Name = " + name);
    stringJoiner.add("Type = " + type);
    return stringJoiner.toString();
  }
}

    Element root = xmlDoc.createElement(Plant.class.getSimpleName());
    root.setAttribute("name", name);
    root.setAttribute("type", type);
    xmlDoc.appendChild(root);
    return xmlDoc.getDocumentElement();
  
<no_super_class>