There\'s an XML stream which I need to parse. Since I only need to do it once and build my java objects, SAX looks like the natural choice. I\'m extending DefaultHandler and
I do something very similar, but instead of having boolean flags to tell me what state I'm in, I test for player or team being non-null. Makes things a bit neater. This requires you to set them to null when you detect the end of each element, after you've added it to the relevant list.