public function toXML(DOMElement $parent = null) : DOMElement
    {
        if ($parent === null) {
            $parent = DOMDocumentFactory::create();
            $doc = $parent;
        } else {
            $doc = $parent->ownerDocument;
        }
        $element = $doc->createElementNS(Constants::NS_SAML, $this->nodeName);
        $parent->appendChild($element);

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

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

        return $element;
    }
public function toXML(DOMElement $parent = null) : DOMElement
    {
        if ($parent === null) {
            $parent = DOMDocumentFactory::create();
            $doc = $parent;
        } else {
            $doc = $parent->ownerDocument;
        }
        $element = $doc->createElementNS(Constants::NS_SAML, $this->nodeName);
        $parent->appendChild($element);

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

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

        return $element;
    }
public function toXML ( DOMElement $ parent = null ) : DOMElement { if ( $ parent === null ) { $ parent = DOMDocumentFactory :: create ( ) ; $ doc = $ parent ; } else { $ doc = $ parent -> ownerDocument ; } $ element = $ doc -> createElementNS ( Constants :: NS_SAML , $ this -> nodeName ) ; $ parent -> appendChild ( $ element ) ; if ( $ this -> NameQualifier !== null ) { $ element -> setAttribute ( 'NameQualifier' , $ this -> NameQualifier ) ; } if ( $ this -> SPNameQualifier !== null ) { $ element -> setAttribute ( 'SPNameQualifier' , $ this -> SPNameQualifier ) ; } return $ element ; }
Convert this BaseID to XML.

@param \DOMElement $parent The element we are converting to XML.
@return \DOMElement The XML element after adding the data corresponding to this BaseID.
Convert this BaseID to XML .