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

search for in the

DomNode->owner_document> <DomNode->node_type
Last updated: Fri, 10 Oct 2008

view this page in

DomNode->node_value

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

DomNode->node_value Retourne la valeur d'un noeud

Description

string DomNode->node_value ( void )

DomNode->node_value() retourne la valeur d'un noeud. La valeur a différente signification suivant le type de noeud, tel que présenté ci-dessous :

Signification de la valeur
Type Signification
DomAttribute Valeur de l'attribut
DomAttribute  
DomCDataSection Contenu
DomComment Contenu du commentaire
DomDocument NULL
DomDocumentType NULL
DomElement NULL
DomEntity NULL
DomEntityReference NULL
DomNotation NULL
DomProcessingInstruction Tout le document sans la cible (target)
DomText Contenu du texte



DomNode->owner_document> <DomNode->node_type
Last updated: Fri, 10 Oct 2008
 
add a note add a note User Contributed Notes
DomNode->node_value
erlend at nymedia dot no
07-Apr-2008 05:05
In response to rsl at zonapersonal dot com

Or just make sure you set the right page encoding before you start hot fixing.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Using anything else than Unicode is not really a good strategy anyway.
rsl at zonapersonal dot com
28-Jan-2006 01:18
Inmost work with HTML and browsers you may need to use

$text=utf8_decode($domnode->nodeValue);
or
$text=htmlentities(utf8_decode($domnode->nodeValue));

insted of

$text=$domnode->nodeValue;

To have a browser readable output spetialy if you deal with things like áéúóñ& etc or &amp;&aacute;&aacute; etc.
Salman
02-Oct-2003 02:42
To get the contents of the node, which is for instance:

<a>this is a test</a>

To get the string: "this is a test" use:

// assuming dom is an actual xml-dom
$temp = $dom->get_elements_by_tagname("a");
foreach($temp as $nexta) {
   echo $nexta->get_content();
}

- Salman
http://www.setcomputing.com/

DomNode->owner_document> <DomNode->node_type
Last updated: Fri, 10 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites