is what you were looking for.
I've spent a couple of months playing around with the PHP expat methods (which I was thinking of as SAX ... thanks for probably clearing that up!) and doing the kind of thing you're talking about - turning the XML into a multi-dimensional PHP array for sorting and so on; I wrote this
using that paradigm; it works very well, and i've been recommending it as a method to other people on this forum.
But ... well .... it's getting tedious; no validation; it doesn't parse the document in DOM order; to build the array you basically have to maintain global variables such as $currentTag and $currentAttributes as you move through the XML functions, just to remember where you are and what you're supposed to be including. Getting an array that truly represents the heirarchy of the original XML is nightmarishly difficult - I basically didn't bother, and built simple 2D arrays on a sort of $data["tag_name"] = "tag_data"; basis, and wrote the XML doc to avoid the same tag name being used as children of different tags. If you're using that xml22 API maybe this doesn't matter to you ...
But what I'm saying is, personally, I'm tired of dealing with it. There is the DOM module you mentioned ... but, most of what I've read about it suggests it's not entirely stable; not really suitable for production use. Mind you expat is alleged to have memory leaks as well; dunno though - that's pure hearsay as I don't really know; I've not had any problems with it.
So I looked at those XSLT functions you saw, and yes - they do need sablotron installed. I believe (but I don't know for sure) that Salbotron is a C version of the java Xalan engine - in C so that it works without a JRE).
Whatever; I just followed the instructions on their website. It's worth installing - XSLT may be a lot more verbose, and hence slower to process, but it is very powerful, flexible, and (of course) infinitely extensible.
It tooks me 10 minutes to install it on my home server; a quick email to my web host's tech support and now I have it running on that as well. Sorted I say