|
Node Director
|
The XMLTokener extends the JSONTokener to provide additional methods for the parsing of XML texts. More...
Public Member Functions | |
| XMLTokener (String s) | |
| Construct an XMLTokener from a string. | |
| Object | nextContent () throws ParseException |
| Get the next XML outer token, trimming whitespace. | |
| Object | nextEntity (char a) throws ParseException |
| Return the next entity. | |
| Object | nextMeta () throws ParseException |
| Returns the next XML meta token. | |
| Object | nextToken () throws ParseException |
| Get the next XML Token. | |
Public Member Functions inherited from org.json.JSONTokener | |
| JSONTokener (String s) | |
| Construct a JSONTokener from a string. | |
| void | back () |
| Back up one character. | |
| boolean | more () |
| Determine if the source string still contains characters that next() can consume. | |
| char | next () |
| Get the next character in the source string. | |
| char | next (char c) throws ParseException |
| Consume the next character, and check that it matches a specified character. | |
| String | next (int n) throws ParseException |
| Get the next n characters. | |
| char | nextClean () throws java.text.ParseException |
| Get the next char in the string, skipping whitespace and comments (slashslash, slashstar, and hash). | |
| String | nextString (char quote) throws ParseException |
| Return the characters up to the next close quote character. | |
| String | nextTo (char d) |
| Get the text up but not including the specified character or the end of line, whichever comes first. | |
| String | nextTo (String delimiters) |
| Get the text up but not including one of the specified delimeter characters or the end of line, whichever comes first. | |
| Date | nextDate () throws ParseException |
| Object | nextValue () throws ParseException |
| Get the next value. | |
| char | skipTo (char to) |
| Skip characters until the next character is the requested character. | |
| void | skipPast (String to) |
| Skip characters until past the requested string. | |
| ParseException | syntaxError (String message) |
| Make a ParseException to signal a syntax error. | |
| String | toString () |
| Make a printable string of this JSONTokener. | |
Static Public Attributes | |
| static final java.util.HashMap | entity |
| The table of entity values. | |
Additional Inherited Members | |
Static Public Member Functions inherited from org.json.JSONTokener | |
| static int | dehexchar (char c) |
| Get the hex value of a character (base16). | |
| static String | unescape (String s) |
Convert %hh sequences to single characters, and convert plus to space. | |
The XMLTokener extends the JSONTokener to provide additional methods for the parsing of XML texts.
| org.json.XMLTokener.XMLTokener | ( | String | s | ) |
Construct an XMLTokener from a string.
| s | A source string. |
| Object org.json.XMLTokener.nextContent | ( | ) | throws ParseException |
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.
| ParseException |
References org.json.JSONTokener.back(), org.json.XML.LT, org.json.JSONTokener.next(), and org.json.XMLTokener.nextEntity().
| Object org.json.XMLTokener.nextEntity | ( | char | a | ) | throws ParseException |
Return the next entity.
These entities are translated to Characters: & ' > < "
| a | An ampersand character. |
| ParseException | Missing ';' in XML entity |
References org.json.XMLTokener.entity, org.json.JSONTokener.next(), and org.json.JSONTokener.syntaxError().
Referenced by org.json.XMLTokener.nextContent(), and org.json.XMLTokener.nextToken().
| Object org.json.XMLTokener.nextMeta | ( | ) | throws ParseException |
Returns the next XML meta token.
This is used for skipping over <!...> and <?...?> structures.
| ParseException |
References org.json.JSONTokener.back(), org.json.XML.BANG, org.json.XML.EQ, org.json.XML.GT, org.json.XML.LT, org.json.JSONTokener.next(), org.json.XML.QUEST, org.json.XML.SLASH, and org.json.JSONTokener.syntaxError().
| Object org.json.XMLTokener.nextToken | ( | ) | throws ParseException |
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.
| ParseException |
References org.json.JSONTokener.back(), org.json.XML.BANG, org.json.XML.EQ, org.json.XML.GT, org.json.JSONTokener.next(), org.json.XMLTokener.nextEntity(), org.json.XML.QUEST, org.json.XML.SLASH, and org.json.JSONTokener.syntaxError().
|
static |
The table of entity values.
It initially contains Character values for amp, apos, gt, lt, quot.
Referenced by org.json.XMLTokener.nextEntity().
1.8.1.2