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