code: public Object nextToken() throws JSONException {
  		char c;
  		char q;
  		StringBuilder sb;
  		do {
  			c = next();
  		} while (Character.isWhitespace(c));
  		switch (c) {
  			case 0:
  				throw syntaxError("Misshaped element");
  			case '<':
  				throw syntaxError("Misplaced '<'");
  			case '>':
  				return XML.GT;
  			case '/':
  				return XML.SLASH;
  			case '=':
  				return XML.EQ;
  			case '!':
  				return XML.BANG;
  			case '?':
  				return XML.QUEST;
  
  			// Quoted string
  
  			case '"':
  			case '\'':
  				q = c;
  				sb = new StringBuilder();
  				for (;;) {
  					c = next();
  					if (c == 0) {
  						throw syntaxError("Unterminated string");
  					}
  					if (c == q) {
  						return sb.toString();
  					}
  					if (c == '&') {
  						sb.append(nextEntity(c));
  					} else {
  						sb.append(c);
  					}
  				}
  			default:
  
  				// Name
  
  				sb = new StringBuilder();
  				for (;;) {
  					sb.append(c);
  					c = next();
  					if (Character.isWhitespace(c)) {
  						return sb.toString();
  					}
  					switch (c) {
  						case 0:
  							return sb.toString();
  						case '>':
  						case '/':
  						case '=':
  						case '!':
  						case '?':
  						case '[':
  						case ']':
  							back();
  							return sb.toString();
  						case '<':
  						case '"':
  						case '\'':
  							throw syntaxError("Bad character in a name");
  					}
  				}
  		}
  	}
docs: Get the next XML Token. These tokens are found inside of angle brackets. It may be one of these characters: <code>/ &gt; = ! ?</code> or it may be a string wrapped in single quotes or double
  quotes, or it may be a name.
  
  @return a String or a Character.
  @throws JSONException If the XML is not well formed.