Generic XML Parser using SAX in Java