Fixing DOM part and implementing SAX part of the second homework (DOM + SAX)