File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
dom /
tests /
DOMNode_getNodePath_basic.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:54 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
DOMNode::getNodePath()
--SKIPIF--
<?php
include('skipif.inc');
?>
--FILE--
<?php
$file = dirname(__FILE__).'/book.xml';
$doc = new DOMDocument();
$doc->load($file);
$nodes = $doc->getElementsByTagName('title');
foreach($nodes as $node) {
var_dump($node->getNodePath());
}
?>
--EXPECTF--
string(20) "/books/book[1]/title"
string(20) "/books/book[2]/title"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>