Peter Clarke wrote:
>"Aaron" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>>Well that works. But its a little bizzare. I have to do that to get the
>>content of a node even when that node has no children...
>>
>>e.g.
>>
>>
>>SOME TEXT GOES HERE
"Aaron" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Well that works. But its a little bizzare. I have to do that to get the
> content of a node even when that node has no children...
>
> e.g.
>
>
> SOME TEXT GOES HERE
>
>
>
> So even if
Well that works. But its a little bizzare. I have to do that to get the
content of a node even when that node has no children...
e.g.
SOME TEXT GOES HERE
So even if the current node is "morestuff" I still have to do the
currentnode->children etc. blah.
which is a bit dodge
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;
4 matches
Mail list logo