SAX parsers don't build in-memory trees. Are you doing that yourself yet? It seems to me you're going to need a tree of objects so you can ask relevant questions about the node, its children, and its...