public static function addString(
        DOMElement $parent,
        string $namespace,
        string $name,
        string $value
    ) : DOMElement {
        $doc = $parent->ownerDocument;

        $n = $doc->createElementNS($namespace, $name);
        $n->appendChild($doc->createTextNode($value));
        $parent->appendChild($n);

        return $n;
    }
public static function addString(
        DOMElement $parent,
        string $namespace,
        string $name,
        string $value
    ) : DOMElement {
        $doc = $parent->ownerDocument;

        $n = $doc->createElementNS($namespace, $name);
        $n->appendChild($doc->createTextNode($value));
        $parent->appendChild($n);

        return $n;
    }
public static function addString ( DOMElement $ parent , string $ namespace , string $ name , string $ value ) : DOMElement { $ doc = $ parent -> ownerDocument ; $ n = $ doc -> createElementNS ( $ namespace , $ name ) ; $ n -> appendChild ( $ doc -> createTextNode ( $ value ) ) ; $ parent -> appendChild ( $ n ) ; return $ n ; }
Append string element.

@param \DOMElement $parent The parent element we should append the new nodes to.
@param string $namespace The namespace of the created element.
@param string $name The name of the created element.
@param string $value The value of the element.
@return \DOMElement The generated element.
Append string element .