public Element toElement(Ticket ticket) {
    Element element = new Element("ticket");
    try {
      element.setAttribute("row", Integer.toString(ticket.getPlace().getRow().getNumber()));
      element.setAttribute("place", Integer.toString(ticket.getPlace().getNumber()));
      element.setAttribute("price", Double.toString(ticket.getPrice()));
    } catch (Exception e) {
      throw new TicketNotFullException("Not full data in ticket.");
    }
    return element;
  }