php8.5
Home/ Manual/ xmlreader / xmlreader/ XMLReader::next

XMLReader::next

PHP function Edit on GitHub ✎

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

Move cursor to next node skipping all subtrees

Description

XMLReader::next(string|null $name = null): bool

Positions cursor on the next node skipping all subtrees. If no such node exists, the cursor is moved to the end of the document.

Parameters

name

The name of the next node to move to.

Return Values

Success

Changelog

VersionDescription
8.0.0name is nullable now.

See Also

  • XMLReader::moveToNextAttribute
  • XMLReader::moveToElement
  • XMLReader::moveToAttribute

Source: reference/xmlreader/xmlreader/next.xml · from the official PHP manual (php/doc-en)