Package org.json
Class XMLTokener
- java.lang.Object
 - 
- org.json.JSONTokener
 - 
- org.json.XMLTokener
 
 
 
- 
@Deprecated public class XMLTokener extends JSONTokener
Deprecated.The XMLTokener extends the JSONTokener to provide additional methods for the parsing of XML texts. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.util.HashMap<java.lang.String,java.lang.Character>entityDeprecated.The table of entity values. 
- 
Constructor Summary
Constructors Constructor Description XMLTokener(java.io.Reader r)Deprecated.Construct an XMLTokener from a Reader.XMLTokener(java.lang.String s)Deprecated.Construct an XMLTokener from a string. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringnextCDATA()Deprecated.Get the text in the CDATA block.java.lang.ObjectnextContent()Deprecated.Get the next XML outer token, trimming whitespace.java.lang.ObjectnextEntity(char ampersand)Deprecated.Return the next entity. These entities are translated to Characters: & ' > < ".java.lang.ObjectnextMeta()Deprecated.Returns the next XML meta token. This is used for skipping over <!...> and <?...?> structures.java.lang.ObjectnextToken()Deprecated.Get the next XML Token. These tokens are found inside of angle brackets. It may be one of these characters: / > = ! ? or it may be a string wrapped in single quotes or double quotes, or it may be a name.voidskipPast(java.lang.String to)Deprecated.Skip characters until past the requested string.- 
Methods inherited from class org.json.JSONTokener
back, close, dehexchar, end, more, next, next, next, nextClean, nextString, nextTo, nextTo, nextValue, skipTo, syntaxError, syntaxError, toString 
 - 
 
 - 
 
- 
- 
Method Detail
- 
nextCDATA
public java.lang.String nextCDATA() throws JSONExceptionDeprecated.Get the text in the CDATA block.- Returns:
 - The string up to the 
]]>. - Throws:
 JSONException- If the]]>is not found.
 
- 
nextContent
public java.lang.Object nextContent() throws JSONExceptionDeprecated.Get the next XML outer token, trimming whitespace. There are two kinds of tokens: the
character which begins a markup tag, and the content text between markup tags.'<'- Returns:
 - A string, or a 
Character, or null if there is no more source text.'<' - Throws:
 JSONException- if a called function has an error
 
- 
nextEntity
public java.lang.Object nextEntity(char ampersand) throws JSONExceptionDeprecated.Return the next entity. These entities are translated to Characters: & ' > < ".- Parameters:
 ampersand- An ampersand character.- Returns:
 - A Character or an entity String if the entity is not recognized.
 - Throws:
 JSONException- If missing ';' in XML entity.
 
- 
nextMeta
public java.lang.Object nextMeta() throws JSONExceptionDeprecated.Returns the next XML meta token. This is used for skipping over <!...> and <?...?> structures.- Returns:
 Syntax characters (< > / = ! ?) are returned as Character, and strings and names are returned as Boolean. We don't care what the values actually are.- Throws:
 JSONException- If a string is not properly closed or if the XML is badly structured.
 
- 
nextToken
public java.lang.Object nextToken() throws JSONExceptionDeprecated.Get the next XML Token. These tokens are found inside of angle brackets. It may be one of these characters: / > = ! ? or it may be a string wrapped in single quotes or double quotes, or it may be a name.- Returns:
 - a String or a Character.
 - Throws:
 JSONException- If the XML is not well formed.
 
- 
skipPast
public void skipPast(java.lang.String to)
Deprecated.Skip characters until past the requested string. If it is not found, we are left at the end of the source with a result of false.- Parameters:
 to- A string to skip past.
 
 - 
 
 -