public function writeText(string $data): XmlStreamWriter
    {
        return $this->append(
                function(\DOMNode $parent) use ($data)
                {
                    $parent->appendChild(
                            $this->doc->createTextNode($this->encode($data))
                    );
                },
                'text'
        );
    }
public function writeText(string $data): XmlStreamWriter
    {
        return $this->append(
                function(\DOMNode $parent) use ($data)
                {
                    $parent->appendChild(
                            $this->doc->createTextNode($this->encode($data))
                    );
                },
                'text'
        );
    }
public function writeText ( string $ data ) : XmlStreamWriter { return $ this -> append ( function ( \ DOMNode $ parent ) use ( $ data ) { $ parent -> appendChild ( $ this -> doc -> createTextNode ( $ this -> encode ( $ data ) ) ) ; } , 'text' ) ; }
Write a text node

@param   string  $data
@return  \stubbles\xml\XmlStreamWriter
Write a text node