public function toNode(DOMDocument $document = null)
    {
        if (null === $document) {
            $document = new DOMDocument();
        }

        $node = $document->createElement('HazMatPackageInformation');

        if ($this->isAllPackedInOneIndicator()) {
            $node->appendChild($document->createElement('AllPackedInOneIndicator'));
        }
        if ($this->isOverPackedIndicator()) {
            $node->appendChild($document->createElement('OverPackedIndicator'));
        }
        if ($this->getQValue() !== null) {
            $node->appendChild($document->createElement('QValue', $this->getQValue()));
        }

        return $node;
    }
public function toNode(DOMDocument $document = null)
    {
        if (null === $document) {
            $document = new DOMDocument();
        }

        $node = $document->createElement('HazMatPackageInformation');

        if ($this->isAllPackedInOneIndicator()) {
            $node->appendChild($document->createElement('AllPackedInOneIndicator'));
        }
        if ($this->isOverPackedIndicator()) {
            $node->appendChild($document->createElement('OverPackedIndicator'));
        }
        if ($this->getQValue() !== null) {
            $node->appendChild($document->createElement('QValue', $this->getQValue()));
        }

        return $node;
    }
public function toNode ( DOMDocument $ document = null ) { if ( null === $ document ) { $ document = new DOMDocument ( ) ; } $ node = $ document -> createElement ( 'HazMatPackageInformation' ) ; if ( $ this -> isAllPackedInOneIndicator ( ) ) { $ node -> appendChild ( $ document -> createElement ( 'AllPackedInOneIndicator' ) ) ; } if ( $ this -> isOverPackedIndicator ( ) ) { $ node -> appendChild ( $ document -> createElement ( 'OverPackedIndicator' ) ) ; } if ( $ this -> getQValue ( ) !== null ) { $ node -> appendChild ( $ document -> createElement ( 'QValue' , $ this -> getQValue ( ) ) ) ; } return $ node ; }
@param null|DOMDocument $document

@return DOMElement
@param null|DOMDocument $document