code: function toXML($addXMLDeclaration = true) {
          $xmlString = $addXMLDeclaration ? "<?xml version=\"1.0\"?><mailing></mailing>" : "<mailing></mailing>";
          $xml = new SimpleXMLElement($xmlString);
  
          if (isset($this->minutes)) $xml->addChild("minutes", $this->minutes);
          if (isset($this->hours)) $xml->addChild("hours", $this->hour);
          if (isset($this->state)) $xml->addChild("state", $this->state);
          if (isset($this->date)) $xml->addChild("date", $this->date);
  
          return $xml;
      }
docs: Serialization to a simple XML element.
  
  @param bool $addXMLDeclaration
  
  @return \em SimpleXMLElement
  Generate a XML element from the contact object.