code: public function toNode(DOMDocument $document = null)
      {
          if (null !== $document) {
              $node = $document->createElement('UnitOfMeasure');
              $node->appendChild($document->createElement('UnitCode', $this->getCode()));
  
              if ($this->getDescription() !== null) {
                  $node->appendChild($document->createElement('UnitDescription', $this->getDescription()));
              }
  
              return $node;
          }
  
          return new DOMElement('UnitOfMeasure');
      }
docs: @param null|DOMDocument $document
  
  @return DOMElement