downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<DomNode->node_nameDomNode->node_value>
Last updated: Thu, 26 Jun 2008

DomNode->node_type

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

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


add a noteadd a note User Contributed Notes
Returns type of node
There are no user contributed notes for this page.




<DomNode->node_nameDomNode->node_value>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs