changes made to implement pretty printing from xmlParser.rb