added skipping of comments and checking for opening tag to Parser::nextTag