xref: /PHP-7.0/ext/xmlreader/tests/010.phpt (revision f9021434)
1--TEST--
2XMLReader: libxml2 XML Reader, next
3--SKIPIF--
4<?php if (!extension_loaded("xmlreader")) print "skip"; ?>
5--FILE--
6<?php
7/* $Id$ */
8$xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
9<prefix:books xmlns:prefix="uri" isbn="" prefix:isbn="12isbn">book1</prefix:books>';
10
11$reader = new XMLReader();
12$reader->XML($xmlstring);
13
14// Only go through
15$reader->read();
16$reader->read();
17
18$reader->next();
19echo $reader->name;
20echo " ";
21echo $reader->getAttributeNs('isbn', 'uri');
22echo "\n";
23?>
24===DONE===
25--EXPECTF--
26prefix:books 12isbn
27===DONE===
28