I am contemplating using XML pull parsing to handle a SOAP message that contains a very complicated XML payload. Basically, I want to pull out a few elements and ignore the rest.
Pull parsing looks like a good choice but I have seen very little discussion of the technique. I would like to hear from people who have used this. I am especially interested in what tools and what pitfalls.
1. Tools: the javax.xml.stream package in Java 1.6 appears to be a complete implementation. 2. Problems: just as in SAX parsing, it is up to you the programmer to keep track of the document hierarchy in some sort of state machine logic. 3. Advantages over SAX - I can only think of two * you dont have to fiddle with the SAX characters() method * stopping parsing once the data is found is cleaner than throwing an exception in SAX