| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.json.JSONTokener
org.opencms.json.XMLTokener
public class XMLTokener
The XMLTokener extends the JSONTokener to provide additional methods for the parsing of XML texts.
| Field Summary | |
|---|---|
| static HashMap | ENTITYThe table of ENTITY values. | 
| Constructor Summary | |
|---|---|
| XMLTokener(String s)Construct an XMLTokener from a string. | |
| Method Summary | |
|---|---|
|  String | nextCDATA()Get the text in the CDATA block. | 
|  Object | nextContent()Get the next XML outer token, trimming whitespace. | 
|  Object | nextEntity(char a)Return the next ENTITY. | 
|  Object | nextMeta()Returns the next XML meta token. | 
|  Object | nextToken()Get the next XML Token. | 
|  boolean | skipPast(String to)Skip characters until past the requested string. | 
| Methods inherited from class org.opencms.json.JSONTokener | 
|---|
| back, dehexchar, more, next, next, next, nextClean, nextString, nextTo, nextTo, nextValue, skipTo, syntaxError, toString | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final HashMap ENTITY
| Constructor Detail | 
|---|
public XMLTokener(String s)
s - a source string| Method Detail | 
|---|
public String nextCDATA()
                 throws JSONException
]]>
JSONException - if the ]]> is not found
public Object nextContent()
                   throws JSONException
There are two kinds of tokens: the '<' character which begins a markup tag, and the content text between markup tags.
JSONException - if something goes wrong
public Object nextEntity(char a)
                  throws JSONException
&  '  >  <  ".
a - an ampersand character
JSONException - if missing ';' in XML entity
public Object nextMeta()
                throws JSONException
< > / = ! ?) are returned as
  Character, and strings and names are returned as Boolean. We don't care
  what the values actually are
JSONException - if a string is not properly closed or if the XML
  is badly structured
public Object nextToken()
                 throws JSONException
 
 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.
JSONException - if the XML is not well formed
public boolean skipPast(String to)
                 throws JSONException
If it is not found, we are left at the end of the source with a result of false.
to - a string to skip past
JSONException - if something goes wrong| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||