org.gjt.xpp.x2impl.x2pullparser
public class X2PullParser extends Object implements XmlPullParser, XmlPullParserEventPosition, XmlPullParserBufferControl, XMLErrorHandler, XMLDocumentHandler
| Nested Class Summary | |
|---|---|
| protected class | X2PullParser.CumulativeReader |
| Field Summary | |
|---|---|
| protected boolean | allowedMixedContent |
| protected X2Attribute[] | attrPos temporary array of current attributes |
| protected int | attrPosEnd index for last attribute in attrPos array |
| protected int | attrPosSize size of attrPos array |
| protected QName | attrQName |
| protected StringBuffer | contentBuf Content of current element if in CONTENT state |
| protected int | contentEventEnd |
| protected int | contentEventStart |
| protected X2PullParser.CumulativeReader | cumulativeReader |
| protected boolean | disableOffsetTracking |
| protected X2ElementContent[] | elStack temprary array to keep ElementContent stack |
| protected int | elStackDepth how many elements are on elStack |
| protected int | elStackSize size of elStack array |
| protected boolean | emptyElement Have we read empty element? |
| protected int | eventEnd end position of current event in tokenizer biffer |
| protected int | eventStart start position of current event in tokenizer biffer |
| protected XMLDocumentSource | fDocumentSource Document source |
| protected boolean | gotContent |
| protected XMLInputSource | inputSource |
| protected XMLLocator | locator |
| protected boolean | mixInElement |
| protected boolean | needToSetInput |
| protected byte | nextState |
| protected boolean | nonWhitespaceContent |
| protected static String | NAMESPACES_FEATURE_ID |
| protected static String | NAMESPACE_PREFIXES_FEATURE_ID |
| protected Hashtable | prefix2Ns mapping of names prefixes to uris |
| protected XMLPullParserConfiguration | pullParserConfiguration |
| String | POS_ABSOLUTE_END |
| String | POS_ABSOLUTE_START |
| protected boolean | reportNsAttribs should parser report namespace xmlns* attributes ? |
| protected boolean | seenContent |
| protected boolean | seenCR |
| protected Exception | seenException |
| protected boolean | seenRootElement Have we seen root element |
| protected boolean | shrinkable |
| protected boolean | startTagInitialized |
| protected byte | state what is current event type as returned from next()? |
| protected boolean | supportNs should parser support namespaces? |
| Constructor Summary | |
|---|---|
| X2PullParser()
Create instance of pull parser. | |
| Method Summary | |
|---|---|
| void | characters(XMLString text, Augmentations augs) |
| void | comment(XMLString text, Augmentations augs) |
| void | doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs) |
| void | emptyElement(QName element, XMLAttributes attributes, Augmentations augs) |
| void | endCDATA(Augmentations augs) |
| void | endDocument(Augmentations augs) |
| void | endElement(QName element, Augmentations augs) |
| void | endEntity(String name, Augmentations augs) |
| void | endGeneralEntity(String name, Augmentations augs) |
| void | endPrefixMapping(String prefix, Augmentations augs) |
| protected void | ensureAttribs(int size)
Make sure that in attributes temporary array is enough space. |
| protected void | ensureCapacity(int size)
Make sure that we have enough space to keep element stack if passed size. |
| void | error(String domain, String key, XMLParseException ex) Error. |
| void | fatalError(String domain, String key, XMLParseException ex) Fatal error. |
| int | getBufferShrinkOffset() |
| int | getColumnNumber() |
| int | getContentLength() |
| int | getDepth() |
| XMLDocumentSource | getDocumentSource() Returns the document source |
| char[] | getEventBuffer() |
| int | getEventEnd() |
| int | getEventStart() |
| byte | getEventType() |
| int | getHardLimit() |
| int | getLineNumber() |
| String | getLocalName() |
| int | getNamespacesLength(int depth) |
| String | getNamespaceUri() |
| String | getPosDesc()
Return string describing current position of parser in input stream as
text 'at line %d (row) and column %d (colum) [seen %s...]'. |
| String | getPrefix() |
| String | getQNameLocal(String qName) |
| String | getQNameUri(String qName) |
| String | getRawName() |
| int | getSoftLimit() |
| void | ignorableWhitespace(XMLString text, Augmentations augs) |
| boolean | isAllowedMixedContent() |
| boolean | isBufferShrinkable() |
| boolean | isNamespaceAttributesReporting() |
| boolean | isNamespaceAware() |
| boolean | isWhitespaceContent()
Return true if just read CONTENT contained only white spaces. |
| byte | next()
This is a key method - translates XNI callbacks
into XPP events
(such as START_TAG, END_TAG, CONTENT).
or END_DOCUMENT if no more input.
|
| void | processingInstruction(String target, XMLString data, Augmentations augs) |
| String | readContent()
Return String that contains just read CONTENT. |
| void | readEndTag(XmlEndTag etag)
Read value of just read END_TAG into passed as argument EndTag. |
| void | readNamespacesPrefixes(int depth, String[] prefixes, int off, int len)
Return namespace prefixes for element at depth |
| void | readNamespacesUris(int depth, String[] uris, int off, int len)
Return namespace URIs for element at depth |
| byte | readNode(XmlNode node) |
| void | readNodeWithoutChildren(XmlNode node) |
| void | readStartTag(XmlStartTag stag)
Read value of just read START_TAG into passed as argument StartTag. |
| void | reset()
Reset parser state so it can be used to parse new |
| protected void | resetState() |
| void | setAllowedMixedContent(boolean enable)
Allow for mixed element content.
|
| void | setBufferShrinkable(boolean shrinkable) |
| void | setDocumentSource(XMLDocumentSource source) Sets the document source |
| void | setHardLimit(int value) |
| void | setInput(Reader reader)
Reset parser and set new input. |
| void | setInput(char[] buf)
Reset parser and set new input. |
| void | setInput(char[] buf, int off, int len) |
| void | setNamespaceAttributesReporting(boolean enable)
Make parser to report xmlns* attributes. |
| void | setNamespaceAware(boolean awareness)
Set support of namespaces. |
| void | setSoftLimit(int value) |
| byte | skipNode()
If parser has just read start tag it allows to skip whoole
subtree contined in this element. |
| void | startCDATA(Augmentations augs) |
| void | startDocument(XMLLocator locator, String encoding, NamespaceContext namespaceContext, Augmentations augs) |
| void | startDocument(XMLLocator locator, String encoding, Augmentations augs) |
| void | startElement(QName element, XMLAttributes attributes, Augmentations augs) |
| void | startEntity(String name, String publicId, String systemId, String baseSystemId, String encoding, Augmentations augs) |
| void | startGeneralEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) |
| void | startPrefixMapping(String prefix, String uri, Augmentations augs) |
| void | textDecl(String version, String encoding, Augmentations augs) |
| void | warning(String domain, String key, XMLParseException ex) Warning. |
| void | xmlDecl(String version, String encoding, String standalone, Augmentations augs) |