--TEST-- XMLReader: libxml2 XML Reader, next --SKIPIF-- --FILE-- '; $reader = new XMLReader(); $reader->XML($xmlstring); // Only go through $reader->read(); $reader->read(); $reader->next(); echo $reader->name; echo " "; echo $reader->getAttribute('num'); echo "\n"; ?> --EXPECT-- book 2