code: public function toNode(DOMDocument $document = null)
      {
          if (null === $document) {
              $document = new DOMDocument();
          }
  
          $node = $document->createElement('Dimensions');
          $node->appendChild($document->createElement('Length', $this->getLength()));
          $node->appendChild($document->createElement('Height', $this->getHeight()));
          $node->appendChild($document->createElement('Width', $this->getWidth()));
          $node->appendChild($this->getUnitOfMeasurement()->toNode($document));
  
          return $node;
      }
docs: @param null|DOMDocument $document
  
  @return DOMElement