public function toXML(DOMNode $parentElement = null) : DOMElement
    {
        if ($parentElement === null) {
            $document = DOMDocumentFactory::create();
            $parentElement = $document;
        } else {
            $document = $parentElement->ownerDocument;
        }

        $root = $document->createElementNS(Constants::NS_SAML, 'saml:'.'EncryptedAssertion');
        $parentElement->appendChild($root);

        $root->appendChild($document->importNode($this->encryptedData, true));

        return $root;
    }
public function toXML(DOMNode $parentElement = null) : DOMElement
    {
        if ($parentElement === null) {
            $document = DOMDocumentFactory::create();
            $parentElement = $document;
        } else {
            $document = $parentElement->ownerDocument;
        }

        $root = $document->createElementNS(Constants::NS_SAML, 'saml:'.'EncryptedAssertion');
        $parentElement->appendChild($root);

        $root->appendChild($document->importNode($this->encryptedData, true));

        return $root;
    }
public function toXML ( DOMNode $ parentElement = null ) : DOMElement { if ( $ parentElement === null ) { $ document = DOMDocumentFactory :: create ( ) ; $ parentElement = $ document ; } else { $ document = $ parentElement -> ownerDocument ; } $ root = $ document -> createElementNS ( Constants :: NS_SAML , 'saml:' . 'EncryptedAssertion' ) ; $ parentElement -> appendChild ( $ root ) ; $ root -> appendChild ( $ document -> importNode ( $ this -> encryptedData , true ) ) ; return $ root ; }
Convert this encrypted assertion to an XML element.

@param  \DOMNode|null $parentElement The DOM node the assertion should be created in.
@return \DOMElement   This encrypted assertion.
Convert this encrypted assertion to an XML element .