i am getting below error for magento 2.4 and it is working fine in magento 2.3
Magento\Framework\Exception\LocalizedException: The XML in file "/var/www/html/magento240/app/code/PPPL/PhonePe/etc/frontend/events.xml" is invalid: Element 'event': Missing child element(s). Expected is ( observer ). Line: 4 Verify the XML and try again. in /var/www/html/magento240/vendor/magento/framework/Config/Reader/Filesystem.php:156 Stack trace: #0 /var/www/html/magento240/vendor/magento/framework/Config/Reader/Filesystem.php(132)
Please find the code for /var/www/html/magento240/app/code/PPPL/PhonePe/etc/frontend/events.xml
<?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"><event name="checkout_onepage_controller_success_action">
<!-- Do nothing -->
</event>
</config>