XML into struct
Aaaaaah, I just discovered PHP's xml_parse_into_struct function. Very cool, since I didn't know it existed before. However, the data structures it creates are totally flat. It makes it really hard to discover the actual structure of the XML.
I mean, PHP has easy to use nestable data structures, but no, instead of just using them in a format that would make people's lives easier they just pretty much give a dump of the XML parser's output. Rather than using one data structure to represent the entire document they give you this complex two array indexed structure.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):