code: public function toNode(DOMDocument $document = null)
      {
          if (null === $document) {
              $document = new DOMDocument();
          }
  
          $node = $document->createElement('PackageServiceOptions');
  
          if ($this->getInsuredValue()) {
              $node->appendChild($this->getInsuredValue()->toNode($document));
          }
          foreach ($this->getHazMat() as $hazmat) {
              $node->appendChild($hazmat->toNode($document));
          }
          if ($this->getHazMatPackageInformation() !== null) {
              $node->appendChild($this->getHazMatPackageInformation()->toNode($document));
          }
          if (isset($this->deliveryConfirmation)) {
              $node->appendChild($this->deliveryConfirmation->toNode($document));
          }
          if (isset($this->ShipperReleaseIndicator)) {
              $node->appendChild($document->createElement('ShipperReleaseIndicator'));
          }
  
          return $node;
      }
docs: @param null|DOMDocument $document
  
  @TODO: this seem to be awfully incomplete
  
  @return DOMElement