Compzone.Org :: Podręcznik PHP :: DomNode->node_type
Która technologia najbardziej Cię interesuje?
PHP
ASP
AJAX
SQL
JavaScript
Inna
Sonda Wyniki

Add to Google

DomNode->node_type

(no version information, might be only in CVS)

DomNode->node_type --  Returns type of node

Opis

int DomNode->node_type ( void )

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

Przykład 1.

<?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";
  }
}

?>

Powyższy przykład wyświetli:

title
para
Copyright © 2005-2006 Compzone.Org. Kopiowanie i wykorzystywanie materiałów zawartych na tej stronie bez zgody autora zabronione!