|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.bea.xml.stream.MXParser
| Field Summary | |
protected boolean |
allStringsInterned
Implementation notice: the is instance variable that controls if newString() is interning. |
protected int |
attributeCount
|
protected String[] |
attributeName
|
protected int[] |
attributeNameHash
|
protected String[] |
attributePrefix
|
protected String[] |
attributeUri
|
protected String[] |
attributeValue
|
protected char[] |
buf
|
protected int |
bufAbsoluteStart
|
protected int |
bufEnd
|
protected int |
bufLoadFactor
|
protected int |
bufSoftLimit
|
protected int |
bufStart
|
protected String |
charEncodingScheme
|
protected char[] |
charRefOneCharBuf
|
protected int |
columnNumber
|
protected HashMap |
defaultAttributes
|
protected int |
depth
|
protected String[] |
elName
|
protected int[] |
elNamespaceCount
|
protected String[] |
elPrefix
|
protected char[][] |
elRawName
|
protected int[] |
elRawNameEnd
|
protected String[] |
elUri
|
protected boolean |
emptyElementTag
|
protected static char[] |
ENCODING
|
protected int |
entityEnd
|
protected String[] |
entityName
|
protected char[][] |
entityNameBuf
|
protected int[] |
entityNameHash
|
protected String |
entityRefName
|
protected String[] |
entityReplacement
|
protected char[][] |
entityReplacementBuf
|
protected int |
eventType
|
protected static String |
FEATURE_NAMES_INTERNED
|
static String |
FEATURE_PROCESS_DOCDECL
|
static String |
FEATURE_PROCESS_NAMESPACES
|
protected static String |
FEATURE_XML_ROUNDTRIP
|
protected String |
inputEncoding
|
protected int |
lineNumber
|
protected int |
localNamespaceEnd
|
protected String[] |
localNamespacePrefix
|
protected int[] |
localNamespacePrefixHash
|
protected String[] |
localNamespaceUri
|
protected static int |
LOOKUP_MAX
|
protected static char |
LOOKUP_MAX_CHAR
|
protected static boolean[] |
lookupNameChar
|
protected static boolean[] |
lookupNameStartChar
|
protected int |
namespaceEnd
|
protected String[] |
namespacePrefix
|
protected int[] |
namespacePrefixHash
|
protected String[] |
namespaceUri
|
protected static char[] |
NO
|
static String |
NO_NAMESPACE
|
protected boolean |
pastEndTag
|
protected char[] |
pc
|
protected int |
pcEnd
|
protected int |
pcStart
|
protected String |
piData
|
protected String |
piTarget
|
protected int |
pos
|
protected int |
posEnd
|
protected int |
posStart
|
protected boolean |
processNamespaces
|
protected boolean |
reachedEnd
|
protected static int |
READ_CHUNK_SIZE
|
protected Reader |
reader
|
protected boolean |
roundtripSupported
|
protected boolean |
seenAmpersand
|
protected boolean |
seenDocdecl
|
protected boolean |
seenEndTag
|
protected boolean |
seenMarkup
|
protected boolean |
seenRoot
|
protected boolean |
seenStartTag
|
protected boolean |
standalone
|
protected static char[] |
STANDALONE
|
protected boolean |
standaloneSet
|
protected String |
text
|
protected boolean |
tokenize
|
static String[] |
TYPES
|
protected boolean |
usePC
|
protected static char[] |
VERSION
|
protected static String |
XML_URI
|
protected static String |
XMLNS_URI
|
protected String |
xmlVersion
|
protected static char[] |
YES
|
| Fields inherited from interface javax.xml.stream.XMLStreamConstants |
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
| Constructor Summary | |
MXParser()
|
|
| Method Summary | |
protected void |
addDefaultAttributes(String elementName)
|
boolean |
checkForXMLDecl()
|
void |
close()
|
void |
defineEntityReplacementText(String entityName,
String replacementText)
|
protected void |
ensureAttributesCapacity(int size)
Make sure that in attributes temporary array is enough space. |
protected void |
ensureElementsCapacity()
Make sure that we have enough space to keep element stack if passed size. |
protected void |
ensureEntityCapacity()
|
protected void |
ensureLocalNamespacesCapacity(int size)
|
protected void |
ensureNamespacesCapacity(int size)
|
protected void |
ensurePC(int end)
|
protected static int |
fastHash(char[] ch,
int off,
int len)
simplistic implementation of hash function that has constant time to compute - so it also means diminishing hash quality for long strings but for XML parsing it should be good enough ... |
protected void |
fillBuf()
|
int |
getAttributeCount()
|
String |
getAttributeLocalName(int index)
|
QName |
getAttributeName(int index)
|
String |
getAttributeNamespace(int index)
|
String |
getAttributePrefix(int index)
|
Iterator |
getAttributes()
|
String |
getAttributeType(int index)
|
String |
getAttributeValue(int index)
|
String |
getAttributeValue(String namespace,
String name)
|
String |
getCharacterEncodingScheme()
|
int |
getCharacterOffset()
|
int |
getColumnNumber()
|
ConfigurationContextBase |
getConfigurationContext()
|
int |
getDepth()
|
String |
getElementText()
|
String |
getEncoding()
|
int |
getEventType()
|
boolean |
getFeature(String name)
Unknown properties are |
String |
getInputEncoding()
|
int |
getLineNumber()
|
String |
getLocalName()
|
int |
getLocalNamespaceCount()
|
Location |
getLocation()
|
String |
getLocationURI()
|
QName |
getName()
|
NamespaceContext |
getNamespaceContext()
|
int |
getNamespaceCount()
|
int |
getNamespaceCount(int depth)
|
String |
getNamespacePrefix(int pos)
|
Iterator |
getNamespaces()
|
String |
getNamespaceURI()
|
String |
getNamespaceURI(int pos)
|
String |
getNamespaceURI(String prefix)
|
Iterator |
getOutOfScopeNamespaces()
|
String |
getPIData()
|
String |
getPITarget()
|
String |
getPositionDescription()
Return string describing current position of parsers as text 'STATE [seen %s...] @line:column'. |
String |
getPrefix()
|
Object |
getProperty(String name)
|
String |
getPublicId()
|
String |
getSystemId()
|
String |
getText()
|
char[] |
getTextCharacters()
|
int |
getTextCharacters(int sourceStart,
char[] target,
int targetStart,
int length)
|
int |
getTextLength()
|
int |
getTextStart()
|
Reader |
getTextStream()
|
String |
getValue()
|
String |
getVersion()
|
boolean |
hasAttributes()
|
boolean |
hasName()
|
boolean |
hasNamespaces()
|
boolean |
hasNext()
|
boolean |
hasText()
|
Iterator |
internalGetNamespaces(int depth,
int namespaceCount)
|
boolean |
isAttributeSpecified(int index)
|
boolean |
isCharacters()
|
boolean |
isEmptyElementTag()
|
boolean |
isEndElement()
|
boolean |
isEOF()
|
protected boolean |
isNameChar(char ch)
|
protected boolean |
isNameStartChar(char ch)
|
protected boolean |
isS(char ch)
|
boolean |
isStandalone()
|
boolean |
isStartElement()
|
boolean |
isWhiteSpace()
|
protected void |
joinPC()
|
protected char[] |
lookupEntityReplacement(int entitNameLen)
|
protected char |
more()
|
boolean |
moveToEndElement()
|
boolean |
moveToEndElement(String localName)
|
boolean |
moveToEndElement(String localName,
String namespaceUri)
|
boolean |
moveToStartElement()
|
boolean |
moveToStartElement(String localName)
|
boolean |
moveToStartElement(String localName,
String namespaceUri)
|
protected String |
newString(char[] cbuf,
int off,
int len)
|
protected String |
newStringIntern(char[] cbuf,
int off,
int len)
|
int |
next()
|
int |
nextElement()
|
protected int |
nextImpl()
|
int |
nextTag()
|
String |
nextText()
|
int |
nextToken()
|
protected char |
parseAttribute()
|
protected void |
parseCDATA()
|
protected void |
parseComment()
|
protected void |
parseDocdecl()
|
int |
parseEndTag()
|
protected char[] |
parseEntityRef()
|
protected int |
parseEpilog()
|
protected boolean |
parsePI()
|
protected int |
parseProlog()
|
int |
parseStartTag()
|
protected void |
parseXmlDecl(char ch)
|
protected void |
parseXmlDeclWithVersion(int versionStart,
int versionEnd)
|
protected String |
printable(char ch)
|
protected String |
printable(String s)
|
protected void |
processDTD()
|
void |
recycle()
|
void |
require(int type,
String namespace,
String name)
|
protected char |
requireInput(char ch,
char[] input)
|
protected char |
requireNextS()
|
protected void |
resetStringCache()
|
void |
setConfigurationContext(ConfigurationContextBase c)
|
void |
setFeature(String name,
boolean state)
Method setFeature |
void |
setInput(InputStream in)
|
void |
setInput(InputStream inputStream,
String inputEncoding)
|
void |
setInput(Reader in)
|
void |
setProperty(String name,
Object value)
|
void |
skip()
|
protected char |
skipS(char ch)
|
boolean |
standaloneSet()
|
XMLStreamReader |
subReader()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final String XML_URI
protected static final String XMLNS_URI
protected static final String FEATURE_XML_ROUNDTRIP
protected static final String FEATURE_NAMES_INTERNED
public static final String FEATURE_PROCESS_DOCDECL
public static final String[] TYPES
public static final String NO_NAMESPACE
protected boolean allStringsInterned
NOTE: newStringIntern always returns interned strings and newString MAY return interned String depending on this variable.
NOTE: by default in this minimal implementation it is false!
public static final String FEATURE_PROCESS_NAMESPACES
protected boolean processNamespaces
protected boolean roundtripSupported
protected int lineNumber
protected int columnNumber
protected boolean seenRoot
protected boolean reachedEnd
protected int eventType
protected boolean emptyElementTag
protected int depth
protected char[][] elRawName
protected int[] elRawNameEnd
protected String[] elName
protected String[] elPrefix
protected String[] elUri
protected int[] elNamespaceCount
protected String xmlVersion
protected boolean standalone
protected boolean standaloneSet
protected String charEncodingScheme
protected String piTarget
protected String piData
protected HashMap defaultAttributes
protected static final int LOOKUP_MAX
protected static final char LOOKUP_MAX_CHAR
protected static boolean[] lookupNameStartChar
protected static boolean[] lookupNameChar
protected int attributeCount
protected String[] attributeName
protected int[] attributeNameHash
protected String[] attributePrefix
protected String[] attributeUri
protected String[] attributeValue
protected int namespaceEnd
protected String[] namespacePrefix
protected int[] namespacePrefixHash
protected String[] namespaceUri
protected int localNamespaceEnd
protected String[] localNamespacePrefix
protected int[] localNamespacePrefixHash
protected String[] localNamespaceUri
protected int entityEnd
protected String[] entityName
protected char[][] entityNameBuf
protected int[] entityNameHash
protected char[][] entityReplacementBuf
protected String[] entityReplacement
protected static final int READ_CHUNK_SIZE
protected Reader reader
protected String inputEncoding
protected int bufLoadFactor
protected char[] buf
protected int bufSoftLimit
protected int bufAbsoluteStart
protected int bufStart
protected int bufEnd
protected int pos
protected int posStart
protected int posEnd
protected char[] pc
protected int pcStart
protected int pcEnd
protected boolean usePC
protected boolean seenStartTag
protected boolean seenEndTag
protected boolean pastEndTag
protected boolean seenAmpersand
protected boolean seenMarkup
protected boolean seenDocdecl
protected boolean tokenize
protected String text
protected String entityRefName
protected char[] charRefOneCharBuf
protected static final char[] VERSION
protected static final char[] ENCODING
protected static final char[] STANDALONE
protected static final char[] YES
protected static final char[] NO
| Constructor Detail |
public MXParser()
| Method Detail |
protected void resetStringCache()
protected String newString(char[] cbuf,
int off,
int len)
protected String newStringIntern(char[] cbuf,
int off,
int len)
protected void ensureElementsCapacity()
protected boolean isNameStartChar(char ch)
protected boolean isNameChar(char ch)
protected boolean isS(char ch)
protected void ensureAttributesCapacity(int size)
protected void ensureNamespacesCapacity(int size)
protected void ensureLocalNamespacesCapacity(int size)
public int getLocalNamespaceCount()
protected static final int fastHash(char[] ch,
int off,
int len)
protected void ensureEntityCapacity()
public void setFeature(String name,
boolean state)
throws XMLStreamException
name - a Stringstate - a boolean
XMLStreamExceptionpublic boolean getFeature(String name)
public void setProperty(String name,
Object value)
throws XMLStreamException
XMLStreamException
public boolean checkForXMLDecl()
throws XMLStreamException
XMLStreamException
public void setInput(Reader in)
throws XMLStreamException
XMLStreamException
public void setInput(InputStream in)
throws XMLStreamException
XMLStreamException
public void setInput(InputStream inputStream,
String inputEncoding)
throws XMLStreamException
XMLStreamExceptionpublic String getInputEncoding()
public void defineEntityReplacementText(String entityName,
String replacementText)
throws XMLStreamException
XMLStreamExceptionpublic int getNamespaceCount()
getNamespaceCount in interface XMLStreamReaderpublic int getNamespaceCount(int depth)
public String getNamespacePrefix(int pos)
getNamespacePrefix in interface XMLStreamReaderpublic String getNamespaceURI(int pos)
getNamespaceURI in interface XMLStreamReaderpublic String getNamespaceURI(String prefix)
getNamespaceURI in interface XMLStreamReaderpublic int getDepth()
public String getPositionDescription()
public int getLineNumber()
getLineNumber in interface Locationpublic int getColumnNumber()
getColumnNumber in interface Locationpublic String getLocationURI()
public boolean isWhiteSpace()