php-src/ext/xmlreader/tests/010.phpt
2005-12-21 03:58:59 +00:00

28 lines
550 B
PHP

--TEST--
XMLReader: libxml2 XML Reader, next
--SKIPIF--
<?php if (!extension_loaded("xmlreader")) print "skip"; ?>
--FILE--
<?php
/* $Id$ */
$xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
<prefix:books xmlns:prefix="uri" isbn="" prefix:isbn="12isbn">book1</prefix:books>';
$reader = new XMLReader();
$reader->XML($xmlstring);
// Only go through
$reader->read();
$reader->read();
$reader->next();
echo $reader->name;
echo " ";
echo $reader->getAttributeNs('isbn', 'uri');
echo "\n";
?>
===DONE===
--EXPECTF--
prefix:books 12isbn
===DONE===