Are there specific PHP frameworks or libraries recommended for securely handling XML data in PHP applications?

When handling XML data in PHP applications, it is important to ensure that the data is securely processed to prevent vulnerabilities such as XML External Entity (XXE) attacks. To securely handle XML data, it is recommended to use PHP libraries that provide protection against XXE attacks, such as the "XMLReader" class in PHP.

$reader = new XMLReader();
$reader->XML($xml_data, null, LIBXML_NONET);
while ($reader->read()) {
    // Process XML data securely
}
$reader->close();