public function toXML(DOMElement $parent) : ?DOMElement
    {
        $e = null;
        if (!empty($this->DisplayName)
         || !empty($this->Description)
         || !empty($this->InformationURL)
         || !empty($this->PrivacyStatementURL)
         || !empty($this->Keywords)
         || !empty($this->Logo)
         || !empty($this->children)
        ) {
            $doc = $parent->ownerDocument;

            $e = $doc->createElementNS(Common::NS, 'mdui:UIInfo');
            $parent->appendChild($e);

            Utils::addStrings($e, Common::NS, 'mdui:DisplayName', true, $this->DisplayName);
            Utils::addStrings($e, Common::NS, 'mdui:Description', true, $this->Description);
            Utils::addStrings($e, Common::NS, 'mdui:InformationURL', true, $this->InformationURL);
            Utils::addStrings($e, Common::NS, 'mdui:PrivacyStatementURL', true, $this->PrivacyStatementURL);

            foreach ($this->Keywords as $child) {
                $child->toXML($e);
            }

            foreach ($this->Logo as $child) {
                $child->toXML($e);
            }

            foreach ($this->children as $child) {
                $child->toXML($e);
            }
        }

        return $e;
    }
public function toXML(DOMElement $parent) : ?DOMElement
    {
        $e = null;
        if (!empty($this->DisplayName)
         || !empty($this->Description)
         || !empty($this->InformationURL)
         || !empty($this->PrivacyStatementURL)
         || !empty($this->Keywords)
         || !empty($this->Logo)
         || !empty($this->children)
        ) {
            $doc = $parent->ownerDocument;

            $e = $doc->createElementNS(Common::NS, 'mdui:UIInfo');
            $parent->appendChild($e);

            Utils::addStrings($e, Common::NS, 'mdui:DisplayName', true, $this->DisplayName);
            Utils::addStrings($e, Common::NS, 'mdui:Description', true, $this->Description);
            Utils::addStrings($e, Common::NS, 'mdui:InformationURL', true, $this->InformationURL);
            Utils::addStrings($e, Common::NS, 'mdui:PrivacyStatementURL', true, $this->PrivacyStatementURL);

            foreach ($this->Keywords as $child) {
                $child->toXML($e);
            }

            foreach ($this->Logo as $child) {
                $child->toXML($e);
            }

            foreach ($this->children as $child) {
                $child->toXML($e);
            }
        }

        return $e;
    }
public function toXML ( DOMElement $ parent ) : ? DOMElement { $ e = null ; if ( ! empty ( $ this -> DisplayName ) || ! empty ( $ this -> Description ) || ! empty ( $ this -> InformationURL ) || ! empty ( $ this -> PrivacyStatementURL ) || ! empty ( $ this -> Keywords ) || ! empty ( $ this -> Logo ) || ! empty ( $ this -> children ) ) { $ doc = $ parent -> ownerDocument ; $ e = $ doc -> createElementNS ( Common :: NS , 'mdui:UIInfo' ) ; $ parent -> appendChild ( $ e ) ; Utils :: addStrings ( $ e , Common :: NS , 'mdui:DisplayName' , true , $ this -> DisplayName ) ; Utils :: addStrings ( $ e , Common :: NS , 'mdui:Description' , true , $ this -> Description ) ; Utils :: addStrings ( $ e , Common :: NS , 'mdui:InformationURL' , true , $ this -> InformationURL ) ; Utils :: addStrings ( $ e , Common :: NS , 'mdui:PrivacyStatementURL' , true , $ this -> PrivacyStatementURL ) ; foreach ( $ this -> Keywords as $ child ) { $ child -> toXML ( $ e ) ; } foreach ( $ this -> Logo as $ child ) { $ child -> toXML ( $ e ) ; } foreach ( $ this -> children as $ child ) { $ child -> toXML ( $ e ) ; } } return $ e ; }
Convert this UIInfo to XML.

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