--TEST--
XMLReader: Schema validation
--SKIPIF--
--FILE--
- 123
- 456
EOF;
$reader = new XMLReader();
$reader->XML($xml);
$reader->setSchema(__DIR__ . '/013.xsd');
while($reader->read()) {
if ($reader->nodeType == XMLReader::ELEMENT && $reader->name == 'item') {
$reader->read();
var_dump($reader->value);
}
}
$reader->close();
?>
===FAIL===
EOF;
$reader = new XMLReader();
$reader->XML($xml);
$reader->setSchema(__DIR__ . '/013.xsd');
while($reader->read() && $reader->nodeType != XMLReader::ELEMENT);
$reader->close();
?>
--EXPECTF--
string(3) "123"
string(3) "456"
===FAIL===
Warning: XMLReader::read(): Element 'foo': %s