|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.taglib.json.util.JSONTokener atg.taglib.json.util.XMLTokener
public class XMLTokener
The XMLTokener extends the JSONTokener to provide additional methods for the parsing of XML texts.
Field Summary | |
---|---|
static java.util.HashMap |
entity
The table of entity values. |
Constructor Summary | |
---|---|
XMLTokener(java.lang.String s)
Construct an XMLTokener from a string. |
Method Summary | |
---|---|
java.lang.String |
nextCDATA()
Get the text in the CDATA block. |
java.lang.Object |
nextContent()
Get the next XML outer token, trimming whitespace. |
java.lang.Object |
nextEntity(char a)
Return the next entity. |
java.lang.Object |
nextMeta()
Returns the next XML meta token. |
java.lang.Object |
nextToken()
Get the next XML Token. |
Methods inherited from class atg.taglib.json.util.JSONTokener |
---|
back, dehexchar, more, next, next, next, nextClean, nextString, nextTo, nextTo, nextValue, skipPast, 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 java.util.HashMap entity
Constructor Detail |
---|
public XMLTokener(java.lang.String s)
s
- A source string.Method Detail |
---|
public java.lang.String nextCDATA() throws JSONException
]]>
.
JSONException
- If the ]]>
is not found.public java.lang.Object nextContent() throws JSONException
JSONException
public java.lang.Object nextEntity(char a) throws JSONException
& ' > < "
.
a
- An ampersand character.
JSONException
- If missing ';' in XML entity.public java.lang.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 java.lang.Object nextToken() throws JSONException
/ > = ! ?
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |