public class XMLTokener extends JSONTokener
Modifier and Type | Field and Description |
---|---|
static HashMap |
entity
The table of entity values.
|
Constructor and Description |
---|
XMLTokener(String s)
Construct an XMLTokener from a string.
|
Modifier and Type | Method and Description |
---|---|
String |
nextCDATA()
Get the text in the CDATA block.
|
Object |
nextContent()
Get the next XML outer token, trimming whitespace.
|
Object |
nextEntity(char ampersand)
Return the next entity.
|
Object |
nextMeta()
Returns the next XML meta token.
|
Object |
nextToken()
Get the next XML Token.
|
void |
skipPast(String to)
Skip characters until past the requested string.
|
boolean |
skipPast2(String to)
Skip characters until past the requested string.
|
back, dehexchar, more, next, next, next, nextClean, nextString, nextTo, nextTo, nextValue, skipTo, syntaxError, toString
public static final HashMap entity
public XMLTokener(String s)
s
- A source string.public String nextCDATA() throws JSONException
JSONException
- If the ]]> is not found.public Object nextContent() throws JSONException
JSONException
public Object nextEntity(char ampersand) throws JSONException
ampersand
- An ampersand character.JSONException
- If missing ';' in XML entity.public Object nextMeta() throws JSONException
JSONException
- If a string is not properly closed or if the XML
is badly structured.public Object nextToken() throws JSONException
JSONException
- If the XML is not well formed.public void skipPast(String to)
skipPast
in class JSONTokener
to
- A string to skip past.public boolean skipPast2(String to)
to
- A string to skip past.