org.codehaus.plexus.util.xml.pull
public class MXParser extends Object implements XmlPullParser
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 char[] | charRefOneCharBuf |
protected int | columnNumber |
protected int | depth |
protected String[] | elName |
protected int[] | elNamespaceCount |
protected String[] | elPrefix |
protected char[][] | elRawName |
protected int[] | elRawNameEnd |
protected int[] | elRawNameLine |
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 int | eventType |
protected static String | FEATURE_NAMES_INTERNED |
protected static String | FEATURE_XML_ROUNDTRIP |
protected String | inputEncoding |
protected int | lineNumber |
protected String | location |
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[] | NCODING |
protected static char[] | NO |
protected boolean | pastEndTag |
protected char[] | pc |
protected int | pcEnd |
protected int | pcStart |
protected int | pos |
protected int | posEnd |
protected int | posStart |
protected boolean | preventBufferCompaction |
protected boolean | processNamespaces |
protected static String | PROPERTY_LOCATION |
protected static String | PROPERTY_XMLDECL_CONTENT |
protected static String | PROPERTY_XMLDECL_STANDALONE |
protected static String | PROPERTY_XMLDECL_VERSION |
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 String | text |
protected boolean | tokenize |
protected static char[] | TANDALONE |
static boolean | TRACE_SIZING |
protected boolean | usePC |
protected static char[] | VERSION |
protected String | xmlDeclContent |
protected Boolean | xmlDeclStandalone |
protected String | xmlDeclVersion |
protected static String | XMLNS_URI |
protected static String | XML_URI |
protected static char[] | YES |
Constructor Summary | |
---|---|
MXParser() |
Method Summary | |
---|---|
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 | 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() |
static int | findFragment(int bufMinPos, char[] b, int start, int end) |
int | getAttributeCount() |
String | getAttributeName(int index) |
String | getAttributeNamespace(int index) |
String | getAttributePrefix(int index) |
String | getAttributeType(int index) |
String | getAttributeValue(int index) |
String | getAttributeValue(String namespace, String name) |
int | getColumnNumber() |
int | getDepth() |
int | getEventType() |
boolean | getFeature(String name) Unknown properties are |
String | getInputEncoding() |
int | getLineNumber() |
String | getName() |
String | getNamespace(String prefix) |
String | getNamespace() |
int | getNamespaceCount(int depth) |
String | getNamespacePrefix(int pos) |
String | getNamespaceUri(int pos) |
String | getPositionDescription()
Return string describing current position of parsers as
text 'STATE [seen %s...] |
String | getPrefix() |
Object | getProperty(String name) |
String | getText() |
char[] | getTextCharacters(int[] holderForStartAndLength) |
boolean | isAttributeDefault(int index) |
boolean | isEmptyElementTag() |
protected boolean | isNameChar(char ch) |
protected boolean | isNameStartChar(char ch) |
protected boolean | isS(char ch) |
boolean | isWhitespace() |
protected void | joinPC() |
protected char[] | lookuEntityReplacement(int entitNameLen) |
protected char | more() |
protected String | newString(char[] cbuf, int off, int len) |
protected String | newStringIntern(char[] cbuf, int off, int len) |
int | next() |
protected int | nextImpl() |
int | nextTag() |
String | nextText() |
int | nextToken() |
protected char | parseAttribute() |
protected void | parseCDSect(boolean hadCharData) |
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) |
void | require(int type, String namespace, String name) |
protected char | requireInput(char ch, char[] input) |
protected char | requireNextS() |
protected void | reset() |
protected void | resetStringCache() |
void | setFeature(String name, boolean state)
Method setFeature
|
void | setInput(Reader in) |
void | setInput(InputStream inputStream, String inputEncoding) |
static void | setName(char ch) |
static void | setNameStart(char ch) |
void | setProperty(String name, Object value) |
protected char | skipS(char ch) |
void | skipSubTree()
Skip sub tree that is currently porser positioned on.
|
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!
Parameters: name a String state a boolean
Throws: XmlPullParserException