posted 21 years ago
These are poorly written questions because they give conflicting requirements and wrong answers. The real exam is not quite this bad. If the question states that performance and/or memory are a big concern then the answer is almost certainly going to be SAX.
The author of the question (I guess) would say that performance and memory are secondary to the other requirement, but I would say that if you don't have enough memory to load the document using DOM, then nothing else matters. You CAN sort using SAX (might be hard, but possible) and you CAN search for a few elements using SAX (may actually be more efficient than DOM anyway), but if you don't have enough memory to load the document using DOM then you CAN'T sort and you CAN'T search for a few items.
So, the bottom line is the answers given to these sample questions are WRONG! There really aren't any good sample exams that don't contain bad questions like these and are similar to the IBM style of questions. The closest is the IBM sample XML exam.