I beg to differ MiJaySung, it all depends on what problem you are trying to solve. It seems to me that "your" problems are mostly solved with DOM.
SAX is a top down parser. It starts at the start, moves to the end, giving you a single pass over the XML to process the information. Excellent for template parsing (and bad in some situations). SAX parsing gives you the ability to do something at each node (or not if you dont want to). SAX is the more memory efficient of the two methods (SAX vs DOM - not taking your code into account, just the xml parser itself)
DOM allows you to manipulate the XML document itself. By loading it in a tree structure, you can move around that tree, add/remove nodes at will, and then put it all back into the document. This is at the expense of having to load the whole document into memory, whereas SAX only loads the part you are looking at, then "forgets" the rest (hence why MiiJaySung said you might need to create a stack - although mostly this is still more efficient than holding the whole doc in memory like DOM does).
SAX vs DOM = Speed/Efficiency vs Flexability/Performance
That said, at times, using SAX can be like pulling teeth if you have to keep track of your path through the document. But .... its the easier of the two to learn if you aren't familiar with tree traversal techniques.
SAX is good if your document is always structured in the same order.
XPATH is a different animal altogether. Its just a technique for querying documents. For example, I can ask it to pull out just one node at a time without worrying about the rest of the document. From that point you have to decide what parser you are going to use to process the data, SAX or DOM.
And just for good measure, SimpleXML is very similar to DOM, but makes it a whole lot easier to use as you can traverse it using standard iteration techniques like you would with arrays, objects and iterators.