PHP
my php5.org
DomNode->node_value> <DomNode->node_name
Last updated: Fri, 24 Apr 2009

DomNode->node_type

(PHP 4 >= 4.1.0)

DomNode->node_type Returns type of node

Description

int DomNode->node_type ( void )

Returns the type of the node. All possible types are listed in the table in the introduction.

<?php

include 'example.inc';

$dom domxml_open_mem($xmlstr);

$chapter $dom->document_element();

// Let's see the elements contained in chapter
foreach($chapter->child_nodes() as $node) {
  if (
$node->node_type() == XML_ELEMENT_NODE) {
    echo 
$node->node_name() . "\n";
  }
}

?>

The above example will output:

title
para


User Contributed Notes
DomNode->node_type
There are no user contributed notes for this page.

DomNode->node_value> <DomNode->node_name
Last updated: Fri, 24 Apr 2009