saloonphp / xml-wrangler

🌵 XML Wrangler - Easily Read & Write XML in PHP
MIT License
361 stars 14 forks source link

Feature | Remove Namespaces From Reader #23

Closed Sammyjo20 closed 11 months ago

Sammyjo20 commented 11 months ago

This PR introduces the ability to remove namespaces from the XML reader in a memory-efficient way. The namespaces are not removed from the reader before reading, but the matcher changes if the user wants to discard namespaces. After that, the XML decoding passes in an XML configurator which removes the namespaces and element prefixes from the final searched XML.

I have also removed the namespaces from the XPath methods by using a different XPath configurator rule.