# File nqxml/tokenizer.rb, line 783
 def nextTag
	    while @currInput.pos >= @currInput.length
		@inputStack.pop()
		@currInput = @inputStack.last
	    end

	    sourceStartPos = @currInput.pos - 1

	    # Determine if negated by starting slash
	    isTagEnd = peekMatches?('/')
	    skipChar() if isTagEnd

	    # Get name
	    skipSpaces()
	    name = nextName()

	    # Read attributes
	    attrs = isTagEnd ? nil :
		nextTagAttributes('tag', name)

	    # Check for slash at end of tag
	    skipSpaces()
	    c = peekChar()
	    makeNegatedCopy = (c == '/')
	    if makeNegatedCopy
		if isTagEnd
		    str = "malformed tag '#{name}': slash appears at both" +
			" beginning and end of tag"
		    raise ParserError.new(str, self)
		end
		skipChar()	# eat '/'
		c = peekChar()
	    end

	    if c != '>'
		str = "malformed tag '#{name}': missing '>' after attributes"
		raise ParserError.new(str, self)
	    end
	    skipChar()		# eat '>'

	    source = @currInput.string[sourceStartPos ... @currInput.pos]
	    if makeNegatedCopy
		# Create tag for next token and get rid of trailing slash
		# in source text.
		@generatedEndTag = Tag.new(name, nil, true, source)
	    end
	    return Tag.new(name, attrs, isTagEnd, source)
	end