public function toXML(DOMElement $parent) : DOMElement
    {
        $doc = $parent->ownerDocument;

        $e = $doc->createElementNS(XMLSecurityDSig::XMLDSIGNS, 'ds:KeyInfo');
        $parent->appendChild($e);

        if ($this->Id !== null) {
            $e->setAttribute('Id', $this->Id);
        }

        foreach ($this->info as $n) {
            $n->toXML($e);
        }

        return $e;
    }
public function toXML(DOMElement $parent) : DOMElement
    {
        $doc = $parent->ownerDocument;

        $e = $doc->createElementNS(XMLSecurityDSig::XMLDSIGNS, 'ds:KeyInfo');
        $parent->appendChild($e);

        if ($this->Id !== null) {
            $e->setAttribute('Id', $this->Id);
        }

        foreach ($this->info as $n) {
            $n->toXML($e);
        }

        return $e;
    }
public function toXML ( DOMElement $ parent ) : DOMElement { $ doc = $ parent -> ownerDocument ; $ e = $ doc -> createElementNS ( XMLSecurityDSig :: XMLDSIGNS , 'ds:KeyInfo' ) ; $ parent -> appendChild ( $ e ) ; if ( $ this -> Id !== null ) { $ e -> setAttribute ( 'Id' , $ this -> Id ) ; } foreach ( $ this -> info as $ n ) { $ n -> toXML ( $ e ) ; } return $ e ; }
Convert this KeyInfo to XML.

@param \DOMElement $parent The element we should append this KeyInfo to.
@return \DOMElement
Convert this KeyInfo to XML .