(PHP 8 >= 8.4.0)
XMLReader::fromString — Creates an XMLReader from an XML string
$source
$encoding
null
$flags
Creates an XMLReader from an XML string.
source
String containing the XML to be parsed.
encoding
The document encoding or null.
flags
A bitmask of the LIBXML_* constants.
Returns an XMLReader.