Package org.jivesoftware.openfire.net
Class MXParser
java.lang.Object
org.xmlpull.mxp1.MXParser
org.jivesoftware.openfire.net.MXParser
- All Implemented Interfaces:
org.xmlpull.v1.XmlPullParser
public class MXParser
extends org.xmlpull.mxp1.MXParser
MXParser that returns an IGNORABLE_WHITESPACE event when a whitespace character or a
line feed is received. This parser is useful when not validating documents.
- Author:
- Gaston Dombiak
-
Field Summary
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, YESFields 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 -
Method Summary
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, getFeature, getInputEncoding, getLineNumber, getName, getNamespace, getNamespace, getNamespaceCount, getNamespacePrefix, getNamespaceUri, getPositionDescription, getPrefix, getProperty, getText, getTextCharacters, isAttributeDefault, isEmptyElementTag, isNameChar, isNameStartChar, isS, isWhitespace, joinPC, lookuEntityReplacement, newString, newStringIntern, next, nextTag, nextText, nextToken, parseAttribute, parseCDSect, parseComment, parseDocdecl, parseEndTag, parseEntityRef, parseEpilog, parsePI, parseProlog, parseStartTag, parseXmlDecl, parseXmlDeclWithVersion, printable, printable, require, requireInput, requireNextS, reset, resetStringCache, setFeature, setInput, setInput, setProperty, skipS, skipSubTree
-
Constructor Details
-
MXParser
public MXParser()
-
-
Method Details
-
nextImpl
- Overrides:
nextImplin classorg.xmlpull.mxp1.MXParser- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-
getLastHeartbeat
public long getLastHeartbeat()Returns the last time a heartbeat was received. Hearbeats are represented as whitespaces or \n characters received when an XmlPullParser.END_TAG was parsed. Note that we can falsely detect heartbeats when parsing XHTML content but that is fine.- Returns:
- the time in milliseconds when a heartbeat was received.
-
resetInput
public void resetInput() -
more
Makes sure that each individual character is a valid XML character. Note that when MXParser is being modified to handle multibyte chars correctly, this method needs to change (as then, there are more codepoints to check).- Overrides:
morein classorg.xmlpull.mxp1.MXParser- Throws:
IOExceptionorg.xmlpull.v1.XmlPullParserException
-