SAX is a top-down parser and allows serial access to a XML document, and works well for read only access. DOM on the other hand is more robust - it reads the entire XML document into a tree, and is very efficient when you want to alter, add, remove data in that XML tree. XPath is useful when you only need a couple of values from the XML document, and you know where to find them (you know the path of the data, /root/item/challange/text).
SAX: Time efficient when iterating through the document, gives a single pass for every iteration
DOM: Flexible/performance, gives you more ways to work your data
XPath: Time efficient when you only need to read a couple of values
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…