Package org.xmlpull.mxp1
Class MXParserNonValidating
- java.lang.Object
-
- org.xmlpull.mxp1.MXParser
-
- org.xmlpull.mxp1.MXParserCachingStrings
-
- org.xmlpull.mxp1.MXParserNonValidating
-
- All Implemented Interfaces:
Cloneable,XmlPullParser
public class MXParserNonValidating extends MXParserCachingStrings
Extend MXP parser to be full non validating XML 1.0 parser (added internal DTD parsing and support for full XML 1.0 (or 1.1) character classes).- Author:
- Aleksander Slominski
-
-
Field Summary
-
Fields inherited from class org.xmlpull.mxp1.MXParserCachingStrings
CACHE_LOAD, CACHE_STATISTICS, cacheEntriesCount, cacheEntriesThreshold, cacheStatCalls, cacheStatRehash, cacheStatResets, cacheStatWalks, INITIAL_CAPACITY, keys, TRACE_SIZING, values
-
Fields inherited from class org.xmlpull.mxp1.MXParser
allStringsInterned, attributeCount, attributeName, attributeNameHash, attributePrefix, attributeUri, attributeValue, buf, bufAbsoluteStart, bufEnd, bufLoadFactor, bufSoftLimit, bufStart, charRefOneCharBuf, columnNumber, depth, elName, elNamespaceCount, elPrefix, elRawName, elRawNameEnd, elRawNameLine, elUri, emptyElementTag, entityEnd, entityName, entityNameBuf, entityNameHash, entityRefName, entityReplacement, entityReplacementBuf, eventType, FEATURE_NAMES_INTERNED, FEATURE_XML_ROUNDTRIP, inputEncoding, inputStream, lineNumber, location, LOOKUP_MAX, LOOKUP_MAX_CHAR, lookupNameChar, lookupNameStartChar, namespaceEnd, namespacePrefix, namespacePrefixHash, namespaceUri, NCODING, NO, pastEndTag, pc, pcEnd, pcStart, pos, posEnd, posStart, preventBufferCompaction, processNamespaces, PROPERTY_LOCATION, PROPERTY_XMLDECL_CONTENT, PROPERTY_XMLDECL_STANDALONE, PROPERTY_XMLDECL_VERSION, reachedEnd, READ_CHUNK_SIZE, reader, roundtripSupported, seenAmpersand, seenDocdecl, seenEndTag, seenMarkup, seenRoot, seenStartTag, TANDALONE, text, tokenize, usePC, VERSION, XML_URI, xmlDeclContent, xmlDeclStandalone, xmlDeclVersion, XMLNS_URI, YES
-
Fields inherited from interface org.xmlpull.v1.XmlPullParser
CDSECT, COMMENT, DOCDECL, END_DOCUMENT, END_TAG, ENTITY_REF, FEATURE_PROCESS_DOCDECL, FEATURE_PROCESS_NAMESPACES, FEATURE_REPORT_NAMESPACE_ATTRIBUTES, FEATURE_VALIDATION, IGNORABLE_WHITESPACE, NO_NAMESPACE, PROCESSING_INSTRUCTION, START_DOCUMENT, START_TAG, TEXT, TYPES
-
-
Constructor Summary
Constructors Constructor Description MXParserNonValidating()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetFeature(String name)Unknown properties are always returned as falseprotected char[]lookuEntityReplacement(int entitNameLen)protected charmore()protected voidparseDocdecl()protected voidprocessAttlistDecl(char ch)protected voidprocessElementDecl(char ch)protected voidprocessEntityDecl(char ch)protected charprocessExternalId(char ch)protected voidprocessInternalSubset()protected voidprocessMarkupDecl(char ch)protected voidprocessNotationDecl(char ch)protected voidprocessPEReference()protected charreadName(char ch)voidsetFeature(String name, boolean state)This allows to change processing DOCDECL (controls if parser is non-validating).-
Methods inherited from class org.xmlpull.mxp1.MXParserCachingStrings
clone, finalize, initStringCache, newString, newStringIntern, resetStringCache
-
Methods inherited from class org.xmlpull.mxp1.MXParser
defineEntityReplacementText, ensureAttributesCapacity, ensureElementsCapacity, ensureEntityCapacity, ensureNamespacesCapacity, ensurePC, fastHash, fillBuf, getAttributeCount, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getColumnNumber, getDepth, getEventType, getInputEncoding, getLineNumber, getName, getNamespace, getNamespace, getNamespaceCount, getNamespacePrefix, getNamespaceUri, getPositionDescription, getPrefix, getProperty, getText, getTextCharacters, isAttributeDefault, isEmptyElementTag, isNameChar, isNameStartChar, isS, isWhitespace, joinPC, next, nextImpl, nextTag, nextText, nextToken, parseAttribute, parseCDSect, parseComment, parseEndTag, parseEntityRef, parseEpilog, parsePI, parseProlog, parseStartTag, parseXmlDecl, parseXmlDeclWithVersion, printable, printable, require, requireInput, requireNextS, reset, setInput, setInput, setProperty, skipS, skipSubTree
-
-
-
-
Method Detail
-
setFeature
public void setFeature(String name, boolean state) throws XmlPullParserException
This allows to change processing DOCDECL (controls if parser is non-validating).- Specified by:
setFeaturein interfaceXmlPullParser- Overrides:
setFeaturein classMXParserCachingStrings- Parameters:
name- a Stringstate- a boolean- Throws:
XmlPullParserException- If the feature is not supported or can not be set
-
getFeature
public boolean getFeature(String name)
Description copied from class:MXParserUnknown properties are always returned as false- Specified by:
getFeaturein interfaceXmlPullParser- Overrides:
getFeaturein classMXParserCachingStrings- Parameters:
name- The name of feature to be retrieved.- Returns:
- The value of the feature.
-
more
protected char more() throws IOException, XmlPullParserException- Overrides:
morein classMXParser- Throws:
IOExceptionXmlPullParserException
-
lookuEntityReplacement
protected char[] lookuEntityReplacement(int entitNameLen) throws XmlPullParserException, IOException- Overrides:
lookuEntityReplacementin classMXParser- Throws:
XmlPullParserExceptionIOException
-
parseDocdecl
protected void parseDocdecl() throws XmlPullParserException, IOException- Overrides:
parseDocdeclin classMXParser- Throws:
XmlPullParserExceptionIOException
-
processExternalId
protected char processExternalId(char ch) throws XmlPullParserException, IOException- Throws:
XmlPullParserExceptionIOException
-
processInternalSubset
protected void processInternalSubset() throws XmlPullParserException, IOException- Throws:
XmlPullParserExceptionIOException
-
processPEReference
protected void processPEReference() throws XmlPullParserException, IOException- Throws:
XmlPullParserExceptionIOException
-
processMarkupDecl
protected void processMarkupDecl(char ch) throws XmlPullParserException, IOException- Throws:
XmlPullParserExceptionIOException
-
processElementDecl
protected void processElementDecl(char ch) throws XmlPullParserException, IOException- Throws:
XmlPullParserExceptionIOException
-
processAttlistDecl
protected void processAttlistDecl(char ch) throws XmlPullParserException, IOException- Throws:
XmlPullParserExceptionIOException
-
processEntityDecl
protected void processEntityDecl(char ch) throws XmlPullParserException, IOException- Throws:
XmlPullParserExceptionIOException
-
processNotationDecl
protected void processNotationDecl(char ch) throws XmlPullParserException, IOException- Throws:
XmlPullParserExceptionIOException
-
readName
protected char readName(char ch) throws XmlPullParserException, IOException- Throws:
XmlPullParserExceptionIOException
-
-