public class BufferingParser extends Object implements XmlPullParser
Modifier and Type | Class and Description |
---|---|
static class |
BufferingParser.Attribute |
static class |
BufferingParser.Event |
static class |
BufferingParser.Namespace |
Modifier and Type | Field and Description |
---|---|
protected boolean |
bypass |
protected BufferingParser.Event |
current |
protected Deque<BufferingParser.Event> |
events |
protected XmlPullParser |
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 and Description |
---|
BufferingParser(XmlPullParser xmlPullParser) |
protected XmlPullParser xmlPullParser
protected Deque<BufferingParser.Event> events
protected BufferingParser.Event current
protected boolean bypass
public BufferingParser(XmlPullParser xmlPullParser)
public void setFeature(String name, boolean state) throws XmlPullParserException
setFeature
in interface XmlPullParser
XmlPullParserException
public boolean getFeature(String name)
getFeature
in interface XmlPullParser
public void setProperty(String name, Object value) throws XmlPullParserException
setProperty
in interface XmlPullParser
XmlPullParserException
public Object getProperty(String name)
getProperty
in interface XmlPullParser
public void setInput(Reader in) throws XmlPullParserException
setInput
in interface XmlPullParser
XmlPullParserException
public void setInput(InputStream inputStream, String inputEncoding) throws XmlPullParserException
setInput
in interface XmlPullParser
XmlPullParserException
public String getInputEncoding()
getInputEncoding
in interface XmlPullParser
public void defineEntityReplacementText(String entityName, String replacementText) throws XmlPullParserException
defineEntityReplacementText
in interface XmlPullParser
XmlPullParserException
public int getNamespaceCount(int depth) throws XmlPullParserException
getNamespaceCount
in interface XmlPullParser
XmlPullParserException
public String getNamespacePrefix(int pos) throws XmlPullParserException
getNamespacePrefix
in interface XmlPullParser
XmlPullParserException
public String getNamespaceUri(int pos) throws XmlPullParserException
getNamespaceUri
in interface XmlPullParser
XmlPullParserException
public String getNamespace(String prefix)
getNamespace
in interface XmlPullParser
public int getDepth()
getDepth
in interface XmlPullParser
public String getPositionDescription()
getPositionDescription
in interface XmlPullParser
public int getLineNumber()
getLineNumber
in interface XmlPullParser
public int getColumnNumber()
getColumnNumber
in interface XmlPullParser
public boolean isWhitespace() throws XmlPullParserException
isWhitespace
in interface XmlPullParser
XmlPullParserException
public String getText()
getText
in interface XmlPullParser
public char[] getTextCharacters(int[] holderForStartAndLength)
getTextCharacters
in interface XmlPullParser
public String getNamespace()
getNamespace
in interface XmlPullParser
public String getName()
getName
in interface XmlPullParser
public String getPrefix()
getPrefix
in interface XmlPullParser
public boolean isEmptyElementTag() throws XmlPullParserException
isEmptyElementTag
in interface XmlPullParser
XmlPullParserException
public int getAttributeCount()
getAttributeCount
in interface XmlPullParser
public String getAttributeNamespace(int index)
getAttributeNamespace
in interface XmlPullParser
public String getAttributeName(int index)
getAttributeName
in interface XmlPullParser
public String getAttributePrefix(int index)
getAttributePrefix
in interface XmlPullParser
public String getAttributeType(int index)
getAttributeType
in interface XmlPullParser
public boolean isAttributeDefault(int index)
isAttributeDefault
in interface XmlPullParser
public String getAttributeValue(int index)
getAttributeValue
in interface XmlPullParser
public String getAttributeValue(String namespace, String name)
getAttributeValue
in interface XmlPullParser
public void require(int type, String namespace, String name) throws XmlPullParserException, IOException
require
in interface XmlPullParser
XmlPullParserException
IOException
public int getEventType() throws XmlPullParserException
getEventType
in interface XmlPullParser
XmlPullParserException
public int next() throws XmlPullParserException, IOException
next
in interface XmlPullParser
XmlPullParserException
IOException
public int nextToken() throws XmlPullParserException, IOException
nextToken
in interface XmlPullParser
XmlPullParserException
IOException
public int nextTag() throws XmlPullParserException, IOException
nextTag
in interface XmlPullParser
XmlPullParserException
IOException
public String nextText() throws XmlPullParserException, IOException
nextText
in interface XmlPullParser
XmlPullParserException
IOException
protected BufferingParser.Event bufferEvent() throws XmlPullParserException
XmlPullParserException
protected void pushEvent(BufferingParser.Event event)
protected boolean accept() throws XmlPullParserException, IOException
XmlPullParserException
IOException
public void bypass(boolean bypass)
public boolean bypass()
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.