PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DOMDocument::getElementById> <DOMDocument::createProcessingInstruction
Last updated: Fri, 20 Jun 2008

view this page in

DOMDocument::createTextNode

(No version information available, might be only in CVS)

DOMDocument::createTextNode — Crée un nouveau noeud de texte

Description

DOMText DOMDocument::createTextNode ( string $content )

Cette fonction crée une nouvelle instance de la classe DOMText. Ce noeud ne sera pas affiché dans le document, à moins qu'il ne soit inséré avec DOMNode->appendChild().

Liste de paramètres

content

Le contenu du texte.

Valeurs de retour

Un nouveau DOMText ou FALSE si une erreur survient.



add a note add a note User Contributed Notes
DOMDocument::createTextNode
anton dot vakulchik at gmail dot com
12-Mar-2008 09:23
//For PHP5
$Doc = new DOMDocument('1.0');
$Dom = $Doc->appendChild(new domelement('log'));
$Dom->setAttribute('class','something');
$Dom->appendChild($Doc->createTextNode('something'));
jon at websandbox dot net
03-Aug-2005 04:01
About escaping characters:
This is standard behavior.  brackets, ampersans, and maybe even quoted will be "escaped" if you output your XML as a string. 

This should not, however, happen if you append your text node to a CDATA section.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites