com.bea.xml.stream
public class MXParser extends Object implements XMLStreamReader, Location
| 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 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 static char[] | ENCODING |
| 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 boolean[] | lookupNameChar |
| protected static boolean[] | lookupNameStartChar |
| protected static int | LOOKUP_MAX |
| protected static char | LOOKUP_MAX_CHAR |
| 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 Reader | reader |
| protected boolean | roundtripSupported |
| protected static int | READ_CHUNK_SIZE |
| protected boolean | seenAmpersand |
| protected boolean | seenDocdecl |
| protected boolean | seenEndTag |
| protected boolean | seenMarkup |
| protected boolean | seenRoot |
| protected boolean | seenStartTag |
| protected boolean | standalone |
| protected boolean | standaloneSet |
| protected static char[] | STANDALONE |
| protected String | text
Lazily-constructed String that contains what getText() returns;
cleared by tokenizer before parsing new events |
| protected boolean | tokenize |
| static String[] | TYPES
These constants are used for diagnostics messages, and need to
match with ones from XMLStreamConstants. |
| protected boolean | usePC |
| protected static char[] | VERSION |
| protected String | xmlVersion |
| protected static char[] | YES |
| 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(int pos) |
| String | getNamespaceURI(String prefix) |
| String | getNamespaceURI() |
| Iterator | getOutOfScopeNamespaces() |
| String | getPIData() |
| String | getPITarget() |
| String | getPositionDescription()
Return string describing current position of parsers as
text 'STATE [seen %s...] |
| String | getPrefix() |
| Object | getProperty(String name) |
| String | getPublicId() |
| String | getSystemId() |
| String | getText() |
| int | getTextCharacters(int sourceStart, char[] target, int targetStart, int length) |
| char[] | getTextCharacters() |
| 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(Reader in) |
| void | setInput(InputStream in) |
| void | setInput(InputStream inputStream, String inputEncoding) |
| void | setProperty(String name, Object value) |
| void | skip() |
| protected char | skipS(char ch) |
| boolean | standaloneSet() |
| XMLStreamReader | subReader() |
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!
Returns: Character array that contains value the reference expands to.
Parameters: name a String state a boolean
Throws: XMLStreamException