Save This Page
Home » json » org.json » [javadoc | source]
org.json
public class: XMLTokener [javadoc | source]
java.lang.Object
   org.json.JSONTokener
      org.json.XMLTokener
The XMLTokener extends the JSONTokener to provide additional methods for the parsing of XML texts.
Field Summary
public static final  HashMap entity    The table of entity values. It initially contains Character values for amp, apos, gt, lt, quot. 
Constructor:
 public XMLTokener(String s) 
    Construct an XMLTokener from a string.
    Parameters:
    s - A source string.
Method from org.json.XMLTokener Summary:
nextCDATA,   nextContent,   nextEntity,   nextMeta,   nextToken,   skipPast
Methods from org.json.JSONTokener:
back,   dehexchar,   more,   next,   next,   next,   nextClean,   nextString,   nextTo,   nextTo,   nextValue,   skipTo,   syntaxError,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.json.XMLTokener Detail:
 public String nextCDATA() throws JSONException 
    Get the text in the CDATA block.
 public Object nextContent() throws JSONException 
    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.
 public Object nextEntity(char a) throws JSONException 
    Return the next entity. These entities are translated to Characters: & ' > < ".
 public Object nextMeta() throws JSONException 
    Returns the next XML meta token. This is used for skipping over and structures.
 public Object nextToken() throws JSONException 
    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.
 public boolean skipPast(String to) throws JSONException 
    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.