(PHP 8 >= 8.4.0)
XMLReader::fromStream — Creates an XMLReader from a stream to read from
$stream,$encoding = null,$flags = 0,$documentUri = nullCreates an XMLReader from a stream to read from.
Returns an XMLReader.
Passing an invalid encoding will throw a
ValueError.
Passing a resource that is not a stream to stream
will throw a TypeError.