I wrote a practical PHP guide: How to Parse Large XML Files in PHP Without Running Out of Memory
It focuses on large XML files, memory safety, XMLReader baseline, selected-node extraction, XML-to-array output.
https://dev.to/sbwerewolf/how-to-parse-large-xml-files-in-php-without-running-out-of-memory-234o

The pattern is intentionally boring: stream XML with XMLReader, match the records you need, convert them into plain PHP arrays, and keep application code away from cursor-level XML logic.
#PHP #XMLReader #ETL #XML #OpenSource

#XMLReader can be confusing at first, but I really like it.
It's minimalistic, super fast and memory efficient. Furthermore it is available in many #programming languages, not just in #PHP (see my sample code here). #XML #backend
Today, a post got published to #reddit r/netsec, concerning a DOS and arbitrary code execution #vulnerability in #XML when parsing it with #Java's #XMLReader. Though correct, maybe hyperbolic: the problem is not limited to Java, and it's possible nobody in the field uses that class. When I first learned about it, years ago, I switched from automated XML parsing to dedicated #XPath-based parsing. That's more cumbersome, for sure, but also more #secure.