Re: php 4.1 and DOMXML question.

From: Date: Wed, 16 Jan 2002 20:52:37 +0000
Subject: Re: php 4.1 and DOMXML question.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-80820@lists.php.net to get a copy of this message
function getNodeContent ($node) { $content = ''; $nodechild = $node->children(); if ( is_array( $nodechild ) ) { reset ($nodechild); while (list (, $val) = each ($nodechild)) { if ( $val->type == XML_TEXT_NODE ) { $content .= $val->content; } } return $content; } } Peter "Aaron" <aarmel@netagi.com> wrote in message news:3C457970.60109@netagi.com... > How the hell do I get the content of a node.... > > before all I had to do was go $node->content > > now it doesnt seem to work. > > I know they changed $node->name to $node->tagname. > > I tried, content, tagcontent, value, mmm some other things. I give up, > couldnt find any info anywhere either... > > theres a set_content() method but doenst seem to be a get_content() > method :(. >

« previous php.general (#80820) next »