org.activiti.engine.impl.util.json
类 XMLTokener

java.lang.Object
  继承者 org.activiti.engine.impl.util.json.JSONTokener
      继承者 org.activiti.engine.impl.util.json.XMLTokener

public class XMLTokener
extends JSONTokener

The XMLTokener extends the JSONTokener to provide additional methods for the parsing of XML texts.

版本:
2010-01-30
作者:
JSON.org

字段摘要
static HashMap entity
          The table of entity values.
 
构造方法摘要
XMLTokener(String s)
          Construct an XMLTokener from a string.
 
方法摘要
 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.
 
从类 org.activiti.engine.impl.util.json.JSONTokener 继承的方法
back, dehexchar, end, more, next, next, next, nextClean, nextString, nextTo, nextTo, nextValue, skipTo, syntaxError, toString
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

entity

public static final HashMap entity
The table of entity values. It initially contains Character values for amp, apos, gt, lt, quot.

构造方法详细信息

XMLTokener

public XMLTokener(String s)
Construct an XMLTokener from a string.

参数:
s - A source string.
方法详细信息

nextCDATA

public String nextCDATA()
                 throws JSONException
Get the text in the CDATA block.

返回:
The string up to the ]]>.
抛出:
JSONException - If the ]]> is not found.

nextContent

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.

返回:
A string, or a '<' Character, or null if there is no more source text.
抛出:
JSONException

nextEntity

public Object nextEntity(char a)
                  throws JSONException
Return the next entity. These entities are translated to Characters: & ' > < ".

参数:
a - An ampersand character.
返回:
A Character or an entity String if the entity is not recognized.
抛出:
JSONException - If missing ';' in XML entity.

nextMeta

public Object nextMeta()
                throws JSONException
Returns the next XML meta token. This is used for skipping over and structures.

返回:
Syntax characters (< > / = ! ?) 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.

nextToken

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.

返回:
a String or a Character.
抛出:
JSONException - If the XML is not well formed.

skipPast

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.

参数:
to - A string to skip past.
抛出:
JSONException


Copyright © 2013 Alfresco. All rights reserved.