com.bea.xml.stream

Class MXParser

Implemented Interfaces:
javax.xml.stream.Location, javax.xml.stream.XMLStreamReader

public class MXParser
extends java.lang.Object
implements javax.xml.stream.XMLStreamReader, javax.xml.stream.Location

XML Streaming Parser.
Author:
Aleksander Slominski

Field Summary

protected static char
CHAR_UTF8_BOM
protected static char[]
ENCODING
protected static String
FEATURE_NAMES_INTERNED
static String
FEATURE_PROCESS_DOCDECL
static String
FEATURE_PROCESS_NAMESPACES
static String
FEATURE_STAX_ENTITIES
static String
FEATURE_STAX_NOTATIONS
protected static String
FEATURE_XML_ROUNDTRIP
protected static int
LOOKUP_MAX
protected static char
LOOKUP_MAX_CHAR
protected static int
MAX_UNICODE_CHAR
protected static char[]
NO
static String
NO_NAMESPACE
This constant defines URI used for "no namespace" (when the default namespace not defined, for elements; when attribute has no prefix, or for all URIs if namespace support is disabled).
protected static int
READ_CHUNK_SIZE
protected static char[]
STANDALONE
static String[]
TYPES
These constants are used for diagnostics messages, and need to match with ones from XMLStreamConstants.
protected static char[]
VERSION
protected static char[]
YES
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
Logics for this should be clarified...
protected int
bufAbsoluteStart
protected int
bufEnd
protected int
bufLoadFactor
protected int
bufSoftLimit
protected int
bufStart
protected String
charEncodingScheme
protected char[]
charRefOneCharBuf
This buffer is used for expanding single character (non-surrogate) character entity expansions.
protected char[]
charRefTwoCharBuf
This buffer is used in cases where an entity expands to a surrogate pair.
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 int
entityEnd
protected String[]
entityName
protected char[][]
entityNameBuf
protected int[]
entityNameHash
protected String
entityRefName
protected String[]
entityReplacement
protected char[][]
entityReplacementBuf
protected char[]
entityValue
Replacement value for the current entity, when automatic entity expansion is disabled.
protected int
eventType
protected String
inputEncoding
protected int
lineNumber
protected int
localNamespaceEnd
protected String[]
localNamespacePrefix
protected int[]
localNamespacePrefixHash
protected String[]
localNamespaceUri
protected static boolean[]
lookupNameChar
protected static boolean[]
lookupNameStartChar
protected com.wutka.dtd.DTD
mDtdIntSubset
If the internal DTD subset was parsed, this object will be non-null, and can be used for accessing entities, elements and notations declared in the internal subset.
protected int
namespaceEnd
protected String[]
namespacePrefix
protected int[]
namespacePrefixHash
protected String[]
namespaceUri
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 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
Flag that indicates whether 'standalone="yes"' was found from the xml declaration.
protected boolean
standaloneSet
protected String
text
Lazily-constructed String that contains what getText() returns; cleared by tokenizer before parsing new events
protected boolean
tokenize
protected boolean
usePC
protected String
xmlVersion
XML version found from the xml declaration, if any.

Constructor Summary

MXParser()

Method Summary

protected void
addDefaultAttributes(String elementName)
protected void
checkCharValidity(int ch, boolean surrogatesOk)
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(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)
javax.xml.namespace.QName
getAttributeName(int index)
String
getAttributeNamespace(int index)
String
getAttributePrefix(int index)
String
getAttributeType(int index)
String
getAttributeValue(String namespace, String name)
String
getAttributeValue(int index)
Iterator
getAttributes()
String
getCharacterEncodingScheme()
int
getCharacterOffset()
int
getColumnNumber()
ConfigurationContextBase
getConfigurationContext()
int
getDepth()
String
getElementText()
String
getEncoding()
int
getEventType()
boolean
getFeature(String name)
Unknown properties are always returned as false
String
getInputEncoding()
int
getLineNumber()
String
getLocalName()
int
getLocalNamespaceCount()
javax.xml.stream.Location
getLocation()
String
getLocationURI()
javax.xml.namespace.QName
getName()
javax.xml.namespace.NamespaceContext
getNamespaceContext()
int
getNamespaceCount()
int
getNamespaceCount(int depth)
String
getNamespacePrefix(int pos)
String
getNamespaceURI()
String
getNamespaceURI(String prefix)
String
getNamespaceURI(int pos)
Iterator
getNamespaces()
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
isEOF()
boolean
isEmptyElementTag()
boolean
isEndElement()
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(boolean replace)
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(String s)
protected String
printable(char ch)
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()
javax.xml.stream.XMLStreamReader
subReader()

Field Details

CHAR_UTF8_BOM

protected static final char CHAR_UTF8_BOM
Field Value:
'\ufeff'

ENCODING

protected static final char[] ENCODING

FEATURE_NAMES_INTERNED

protected static final String FEATURE_NAMES_INTERNED

FEATURE_PROCESS_DOCDECL

public static final String FEATURE_PROCESS_DOCDECL

FEATURE_PROCESS_NAMESPACES

public static final String FEATURE_PROCESS_NAMESPACES

FEATURE_STAX_ENTITIES

public static final String FEATURE_STAX_ENTITIES

FEATURE_STAX_NOTATIONS

public static final String FEATURE_STAX_NOTATIONS

FEATURE_XML_ROUNDTRIP

protected static final String FEATURE_XML_ROUNDTRIP

LOOKUP_MAX

protected static final int LOOKUP_MAX
Field Value:
1024

LOOKUP_MAX_CHAR

protected static final char LOOKUP_MAX_CHAR
Field Value:
'\u0400'

MAX_UNICODE_CHAR

protected static final int MAX_UNICODE_CHAR
Field Value:
1114111

NO

protected static final char[] NO

NO_NAMESPACE

public static final String NO_NAMESPACE
This constant defines URI used for "no namespace" (when the default namespace not defined, for elements; when attribute has no prefix, or for all URIs if namespace support is disabled).

READ_CHUNK_SIZE

protected static final int READ_CHUNK_SIZE
Field Value:
8192

STANDALONE

protected static final char[] STANDALONE

TYPES

public static final String[] TYPES
These constants are used for diagnostics messages, and need to match with ones from XMLStreamConstants.

VERSION

protected static final char[] VERSION

YES

protected static final char[] YES

allStringsInterned

protected boolean allStringsInterned
Implementation notice: the is instance variable that controls if newString() is interning.

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!


attributeCount

protected int attributeCount

attributeName

protected String[] attributeName

attributeNameHash

protected int[] attributeNameHash

attributePrefix

protected String[] attributePrefix

attributeUri

protected String[] attributeUri

attributeValue

protected String[] attributeValue

buf

protected char[] buf
Logics for this should be clarified... but it looks like we use a 8k buffer if there's 1M of free memory or more, otherwise just 256 bytes?

bufAbsoluteStart

protected int bufAbsoluteStart

bufEnd

protected int bufEnd

bufLoadFactor

protected int bufLoadFactor

bufSoftLimit

protected int bufSoftLimit

bufStart

protected int bufStart

charEncodingScheme

protected String charEncodingScheme

charRefOneCharBuf

protected char[] charRefOneCharBuf
This buffer is used for expanding single character (non-surrogate) character entity expansions.

charRefTwoCharBuf

protected char[] charRefTwoCharBuf
This buffer is used in cases where an entity expands to a surrogate pair. Since this is a rare occurence, it's lazily created if needed.

columnNumber

protected int columnNumber

defaultAttributes

protected HashMap defaultAttributes

depth

protected int depth

elName

protected String[] elName

elNamespaceCount

protected int[] elNamespaceCount

elPrefix

protected String[] elPrefix

elRawName

protected char[][] elRawName

elRawNameEnd

protected int[] elRawNameEnd

elUri

protected String[] elUri

emptyElementTag

protected boolean emptyElementTag

entityEnd

protected int entityEnd

entityName

protected String[] entityName

entityNameBuf

protected char[][] entityNameBuf

entityNameHash

protected int[] entityNameHash

entityRefName

protected String entityRefName

entityReplacement

protected String[] entityReplacement

entityReplacementBuf

protected char[][] entityReplacementBuf

entityValue

protected char[] entityValue
Replacement value for the current entity, when automatic entity expansion is disabled. Will always refer to some other array; either globally shared ones (for general entities), or the temp buffer for char entities. As such, does not need to be cleared by tokenizer: will get properly overwritten as needed

eventType

protected int eventType

inputEncoding

protected String inputEncoding

lineNumber

protected int lineNumber

localNamespaceEnd

protected int localNamespaceEnd

localNamespacePrefix

protected String[] localNamespacePrefix

localNamespacePrefixHash

protected int[] localNamespacePrefixHash

localNamespaceUri

protected String[] localNamespaceUri

lookupNameChar

protected static boolean[] lookupNameChar

lookupNameStartChar

protected static boolean[] lookupNameStartChar

mDtdIntSubset

protected com.wutka.dtd.DTD mDtdIntSubset
If the internal DTD subset was parsed, this object will be non-null, and can be used for accessing entities, elements and notations declared in the internal subset.

namespaceEnd

protected int namespaceEnd

namespacePrefix

protected String[] namespacePrefix

namespacePrefixHash

protected int[] namespacePrefixHash

namespaceUri

protected String[] namespaceUri

pastEndTag

protected boolean pastEndTag

pc

protected char[] pc

pcEnd

protected int pcEnd

pcStart

protected int pcStart

piData

protected String piData

piTarget

protected String piTarget

pos

protected int pos

posEnd

protected int posEnd

posStart

protected int posStart

processNamespaces

protected boolean processNamespaces

reachedEnd

protected boolean reachedEnd

reader

protected Reader reader

roundtripSupported

protected boolean roundtripSupported

seenAmpersand

protected boolean seenAmpersand

seenDocdecl

protected boolean seenDocdecl

seenEndTag

protected boolean seenEndTag

seenMarkup

protected boolean seenMarkup

seenRoot

protected boolean seenRoot

seenStartTag

protected boolean seenStartTag

standalone

protected boolean standalone
Flag that indicates whether 'standalone="yes"' was found from the xml declaration.

standaloneSet

protected boolean standaloneSet

text

protected String text
Lazily-constructed String that contains what getText() returns; cleared by tokenizer before parsing new events

tokenize

protected boolean tokenize

usePC

protected boolean usePC

xmlVersion

protected String xmlVersion
XML version found from the xml declaration, if any.

Constructor Details

MXParser

public MXParser()

Method Details

addDefaultAttributes

protected void addDefaultAttributes(String elementName)
            throws javax.xml.stream.XMLStreamException

checkCharValidity

protected void checkCharValidity(int ch,
                                 boolean surrogatesOk)
            throws javax.xml.stream.XMLStreamException

checkForXMLDecl

public boolean checkForXMLDecl()
            throws javax.xml.stream.XMLStreamException

close

public void close()
            throws javax.xml.stream.XMLStreamException
Specified by:
close in interface javax.xml.stream.XMLStreamReader

defineEntityReplacementText

public void defineEntityReplacementText(String entityName,
                                        String replacementText)
            throws javax.xml.stream.XMLStreamException

ensureAttributesCapacity

protected void ensureAttributesCapacity(int size)
Make sure that in attributes temporary array is enough space.

ensureElementsCapacity

protected void ensureElementsCapacity()
Make sure that we have enough space to keep element stack if passed size. It will always create one additional slot then current depth

ensureEntityCapacity

protected void ensureEntityCapacity()

ensureLocalNamespacesCapacity

protected void ensureLocalNamespacesCapacity(int size)

ensureNamespacesCapacity

protected void ensureNamespacesCapacity(int size)

ensurePC

protected void ensurePC(int end)

fastHash

protected static final int fastHash(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 ...

fillBuf

protected void fillBuf()
            throws javax.xml.stream.XMLStreamException,
                   EOFException

getAttributeCount

public int getAttributeCount()
Specified by:
getAttributeCount in interface javax.xml.stream.XMLStreamReader

getAttributeLocalName

public String getAttributeLocalName(int index)
Specified by:
getAttributeLocalName in interface javax.xml.stream.XMLStreamReader

getAttributeName

public javax.xml.namespace.QName getAttributeName(int index)
Specified by:
getAttributeName in interface javax.xml.stream.XMLStreamReader

getAttributeNamespace

public String getAttributeNamespace(int index)
Specified by:
getAttributeNamespace in interface javax.xml.stream.XMLStreamReader

getAttributePrefix

public String getAttributePrefix(int index)
Specified by:
getAttributePrefix in interface javax.xml.stream.XMLStreamReader

getAttributeType

public String getAttributeType(int index)
Specified by:
getAttributeType in interface javax.xml.stream.XMLStreamReader

getAttributeValue

public String getAttributeValue(String namespace,
                                String name)
Specified by:
getAttributeValue in interface javax.xml.stream.XMLStreamReader

getAttributeValue

public String getAttributeValue(int index)
Specified by:
getAttributeValue in interface javax.xml.stream.XMLStreamReader

getAttributes

public Iterator getAttributes()

getCharacterEncodingScheme

public String getCharacterEncodingScheme()
Specified by:
getCharacterEncodingScheme in interface javax.xml.stream.XMLStreamReader

getCharacterOffset

public int getCharacterOffset()
Specified by:
getCharacterOffset in interface javax.xml.stream.Location

getColumnNumber

public int getColumnNumber()
Specified by:
getColumnNumber in interface javax.xml.stream.Location

getConfigurationContext

public ConfigurationContextBase getConfigurationContext()

getDepth

public int getDepth()

getElementText

public String getElementText()
            throws javax.xml.stream.XMLStreamException
Specified by:
getElementText in interface javax.xml.stream.XMLStreamReader

getEncoding

public String getEncoding()
Specified by:
getEncoding in interface javax.xml.stream.XMLStreamReader

getEventType

public int getEventType()
Specified by:
getEventType in interface javax.xml.stream.XMLStreamReader

getFeature

public boolean getFeature(String name)
Unknown properties are always returned as false

getInputEncoding

public String getInputEncoding()

getLineNumber

public int getLineNumber()
Specified by:
getLineNumber in interface javax.xml.stream.Location

getLocalName

public String getLocalName()
Specified by:
getLocalName in interface javax.xml.stream.XMLStreamReader

getLocalNamespaceCount

public int getLocalNamespaceCount()

getLocation

public javax.xml.stream.Location getLocation()
Specified by:
getLocation in interface javax.xml.stream.XMLStreamReader

getLocationURI

public String getLocationURI()

getName

public javax.xml.namespace.QName getName()
Specified by:
getName in interface javax.xml.stream.XMLStreamReader

getNamespaceContext

public javax.xml.namespace.NamespaceContext getNamespaceContext()
Specified by:
getNamespaceContext in interface javax.xml.stream.XMLStreamReader

getNamespaceCount

public int getNamespaceCount()
Specified by:
getNamespaceCount in interface javax.xml.stream.XMLStreamReader

getNamespaceCount

public int getNamespaceCount(int depth)

getNamespacePrefix

public String getNamespacePrefix(int pos)
Specified by:
getNamespacePrefix in interface javax.xml.stream.XMLStreamReader

getNamespaceURI

public String getNamespaceURI()
Specified by:
getNamespaceURI in interface javax.xml.stream.XMLStreamReader

getNamespaceURI

public String getNamespaceURI(String prefix)
Specified by:
getNamespaceURI in interface javax.xml.stream.XMLStreamReader

getNamespaceURI

public String getNamespaceURI(int pos)
Specified by:
getNamespaceURI in interface javax.xml.stream.XMLStreamReader

getNamespaces

public Iterator getNamespaces()

getOutOfScopeNamespaces

public Iterator getOutOfScopeNamespaces()

getPIData

public String getPIData()
Specified by:
getPIData in interface javax.xml.stream.XMLStreamReader

getPITarget

public String getPITarget()
Specified by:
getPITarget in interface javax.xml.stream.XMLStreamReader

getPositionDescription

public String getPositionDescription()
Return string describing current position of parsers as text 'STATE [seen %s...] @line:column'.

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface javax.xml.stream.XMLStreamReader

getProperty

public Object getProperty(String name)

getPublicId

public String getPublicId()
Specified by:
getPublicId in interface javax.xml.stream.Location

getSystemId

public String getSystemId()
Specified by:
getSystemId in interface javax.xml.stream.Location

getText

public String getText()
Specified by:
getText in interface javax.xml.stream.XMLStreamReader

getTextCharacters

public char[] getTextCharacters()
Specified by:
getTextCharacters in interface javax.xml.stream.XMLStreamReader

getTextCharacters

public int getTextCharacters(int sourceStart,
                             char[] target,
                             int targetStart,
                             int length)
            throws javax.xml.stream.XMLStreamException
Specified by:
getTextCharacters in interface javax.xml.stream.XMLStreamReader

getTextLength

public int getTextLength()
Specified by:
getTextLength in interface javax.xml.stream.XMLStreamReader

getTextStart

public int getTextStart()
Specified by:
getTextStart in interface javax.xml.stream.XMLStreamReader

getTextStream

public Reader getTextStream()

getValue

public String getValue()

getVersion

public String getVersion()
Specified by:
getVersion in interface javax.xml.stream.XMLStreamReader

hasAttributes

public boolean hasAttributes()

hasName

public boolean hasName()
Specified by:
hasName in interface javax.xml.stream.XMLStreamReader

hasNamespaces

public boolean hasNamespaces()

hasNext

public boolean hasNext()
            throws javax.xml.stream.XMLStreamException
Specified by:
hasNext in interface javax.xml.stream.XMLStreamReader

hasText

public boolean hasText()
Specified by:
hasText in interface javax.xml.stream.XMLStreamReader

internalGetNamespaces

public Iterator internalGetNamespaces(int depth,
                                      int namespaceCount)

isAttributeSpecified

public boolean isAttributeSpecified(int index)
Specified by:
isAttributeSpecified in interface javax.xml.stream.XMLStreamReader

isCharacters

public boolean isCharacters()
Specified by:
isCharacters in interface javax.xml.stream.XMLStreamReader

isEOF

public boolean isEOF()

isEmptyElementTag

public boolean isEmptyElementTag()
            throws javax.xml.stream.XMLStreamException

isEndElement

public boolean isEndElement()
Specified by:
isEndElement in interface javax.xml.stream.XMLStreamReader

isNameChar

protected boolean isNameChar(char ch)

isNameStartChar

protected boolean isNameStartChar(char ch)

isS

protected boolean isS(char ch)

isStandalone

public boolean isStandalone()
Specified by:
isStandalone in interface javax.xml.stream.XMLStreamReader

isStartElement

public boolean isStartElement()
Specified by:
isStartElement in interface javax.xml.stream.XMLStreamReader

isWhiteSpace

public boolean isWhiteSpace()
Specified by:
isWhiteSpace in interface javax.xml.stream.XMLStreamReader

joinPC

protected void joinPC()

lookupEntityReplacement

protected char[] lookupEntityReplacement(int entitNameLen)
            throws javax.xml.stream.XMLStreamException
Returns:
Character array that contains (unparsed) entity expansion value; or null if no such entity has been declared

more

protected char more()
            throws javax.xml.stream.XMLStreamException,
                   EOFException

moveToEndElement

public boolean moveToEndElement()
            throws javax.xml.stream.XMLStreamException

moveToEndElement

public boolean moveToEndElement(String localName)
            throws javax.xml.stream.XMLStreamException

moveToEndElement

public boolean moveToEndElement(String localName,
                                String namespaceUri)
            throws javax.xml.stream.XMLStreamException

moveToStartElement

public boolean moveToStartElement()
            throws javax.xml.stream.XMLStreamException

moveToStartElement

public boolean moveToStartElement(String localName)
            throws javax.xml.stream.XMLStreamException

moveToStartElement

public boolean moveToStartElement(String localName,
                                  String namespaceUri)
            throws javax.xml.stream.XMLStreamException

newString

protected String newString(char[] cbuf,
                           int off,
                           int len)

newStringIntern

protected String newStringIntern(char[] cbuf,
                                 int off,
                                 int len)

next

public int next()
            throws javax.xml.stream.XMLStreamException
Specified by:
next in interface javax.xml.stream.XMLStreamReader

nextElement

public int nextElement()
            throws javax.xml.stream.XMLStreamException

nextImpl

protected int nextImpl()
            throws javax.xml.stream.XMLStreamException

nextTag

public int nextTag()
            throws javax.xml.stream.XMLStreamException
Specified by:
nextTag in interface javax.xml.stream.XMLStreamReader

nextText

public String nextText()
            throws javax.xml.stream.XMLStreamException

nextToken

public int nextToken()
            throws javax.xml.stream.XMLStreamException

parseAttribute

protected char parseAttribute()
            throws javax.xml.stream.XMLStreamException

parseCDATA

protected void parseCDATA()
            throws javax.xml.stream.XMLStreamException

parseComment

protected void parseComment()
            throws javax.xml.stream.XMLStreamException

parseDocdecl

protected void parseDocdecl()
            throws javax.xml.stream.XMLStreamException

parseEndTag

public int parseEndTag()
            throws javax.xml.stream.XMLStreamException

parseEntityRef

protected char[] parseEntityRef(boolean replace)
            throws javax.xml.stream.XMLStreamException
Returns:
Character array that contains value the reference expands to.

parseEpilog

protected int parseEpilog()
            throws javax.xml.stream.XMLStreamException

parsePI

protected boolean parsePI()
            throws javax.xml.stream.XMLStreamException
Returns:
True if this was the xml declaration; false if a regular processing instruction

parseProlog

protected int parseProlog()
            throws javax.xml.stream.XMLStreamException

parseStartTag

public int parseStartTag()
            throws javax.xml.stream.XMLStreamException

parseXmlDecl

protected void parseXmlDecl(char ch)
            throws javax.xml.stream.XMLStreamException

parseXmlDeclWithVersion

protected void parseXmlDeclWithVersion(int versionStart,
                                       int versionEnd)
            throws javax.xml.stream.XMLStreamException

printable

protected String printable(String s)

printable

protected String printable(char ch)

processDTD

protected void processDTD()
            throws javax.xml.stream.XMLStreamException

recycle

public void recycle()
            throws javax.xml.stream.XMLStreamException

require

public void require(int type,
                    String namespace,
                    String name)
            throws javax.xml.stream.XMLStreamException
Specified by:
require in interface javax.xml.stream.XMLStreamReader

requireInput

protected char requireInput(char ch,
                            char[] input)
            throws javax.xml.stream.XMLStreamException

requireNextS

protected char requireNextS()
            throws javax.xml.stream.XMLStreamException

resetStringCache

protected void resetStringCache()

setConfigurationContext

public void setConfigurationContext(ConfigurationContextBase c)

setFeature

public void setFeature(String name,
                       boolean state)
            throws javax.xml.stream.XMLStreamException
Method setFeature
Parameters:
name - a String
state - a boolean
Throws:
javax.xml.stream.XMLStreamException -

setInput

public void setInput(InputStream in)
            throws javax.xml.stream.XMLStreamException

setInput

public void setInput(InputStream inputStream,
                     String inputEncoding)
            throws javax.xml.stream.XMLStreamException

setInput

public void setInput(Reader in)
            throws javax.xml.stream.XMLStreamException

setProperty

public void setProperty(String name,
                        Object value)
            throws javax.xml.stream.XMLStreamException

skip

public void skip()
            throws javax.xml.stream.XMLStreamException

skipS

protected char skipS(char ch)
            throws javax.xml.stream.XMLStreamException

standaloneSet

public boolean standaloneSet()
Specified by:
standaloneSet in interface javax.xml.stream.XMLStreamReader

subReader

public javax.xml.stream.XMLStreamReader subReader()
            throws javax.xml.stream.XMLStreamException