コード例 #1
0
  /**
   * Converts an <code>EppResponseDataRenewXriNumber</code> object into an XML element.
   *
   * @param doc the XML <code>Document</code> object
   * @param tag the tag/element name for the <code>EppResponseDataRenewXriNumber</code> object
   * @return an <code>Element</code> object
   */
  public Element toXML(Document doc, String tag) {
    Element elm;
    Element body = doc.createElement(tag);
    ElementNSImpl data = EppUtil.createElementNS(doc, "xriINU", "renData");
    body.appendChild(data);

    if (inumber != null) {
      elm = doc.createElement("inumber");
      elm.appendChild(doc.createTextNode(inumber));
      data.appendChild(elm);
    }
    if (exDate != null) {
      elm = doc.createElement("exDate");
      elm.appendChild(EppUtil.createTextNode(doc, exDate));
      data.appendChild(elm);
    }

    return body;
  }