code: public function toNode(DOMDocument $document = null)
      {
          if (null === $document) {
              $document = new DOMDocument();
          }
  
          $node = $document->createElement('LocationSearchCriteria');
  
          if ($this->getAccessPointSearch()) {
              $node->appendChild($this->getAccessPointSearch()->toNode($document));
          }
  
          if ($this->getMaximumListSize()) {
              $node->appendChild($document->createElement('MaximumListSize', $this->getMaximumListSize()));
          }
  
          return $node;
      }
docs: @param null|DOMDocument $document
  
  @return DOMElement