Package org.jivesoftware.smack.xml.xpp3
Class Xpp3XmlPullParser
- java.lang.Object
-
- org.jivesoftware.smack.xml.xpp3.Xpp3XmlPullParser
-
- All Implemented Interfaces:
XmlPullParser
public final class Xpp3XmlPullParser extends java.lang.Object implements XmlPullParser
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jivesoftware.smack.xml.XmlPullParser
XmlPullParser.Event, XmlPullParser.TagEvent
-
-
Constructor Summary
Constructors Constructor Description Xpp3XmlPullParser(org.xmlpull.v1.XmlPullParser xpp3XmlPullParser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAttributeCount()
java.lang.String
getAttributeName(int index)
Returns the loacalpart of the attribute's name ornull
in case the index does not refer to an attribute.java.lang.String
getAttributeNamespace(int index)
java.lang.String
getAttributePrefix(int index)
javax.xml.namespace.QName
getAttributeQName(int index)
java.lang.String
getAttributeType(int index)
java.lang.String
getAttributeValue(int index)
java.lang.String
getAttributeValue(java.lang.String namespace, java.lang.String name)
int
getColumnNumber()
int
getDepth()
XmlPullParser.Event
getEventType()
java.lang.String
getInputEncoding()
int
getLineNumber()
java.lang.String
getName()
Return the name for the current START_ELEMENT or END_ELEMENT event.java.lang.String
getNamespace()
java.lang.String
getNamespace(java.lang.String prefix)
int
getNamespaceCount()
java.lang.String
getNamespacePrefix(int pos)
java.lang.String
getNamespaceUri(int pos)
java.lang.String
getPositionDescription()
java.lang.String
getPrefix()
java.lang.Object
getProperty(java.lang.String name)
javax.xml.namespace.QName
getQName()
java.lang.String
getText()
boolean
isWhiteSpace()
XmlPullParser.Event
next()
XmlPullParser.TagEvent
nextTag()
java.lang.String
nextText()
Reads the content of a text-only element, an exception is thrown if this is not a text-only element.boolean
supportsRoundtrip()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.xml.XmlPullParser
getAttributeValue, getDefaultNamespace
-
-
-
-
Constructor Detail
-
Xpp3XmlPullParser
public Xpp3XmlPullParser(org.xmlpull.v1.XmlPullParser xpp3XmlPullParser)
-
-
Method Detail
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
- Specified by:
getProperty
in interfaceXmlPullParser
-
getInputEncoding
public java.lang.String getInputEncoding()
- Specified by:
getInputEncoding
in interfaceXmlPullParser
-
getNamespaceCount
public int getNamespaceCount() throws XmlPullParserException
- Specified by:
getNamespaceCount
in interfaceXmlPullParser
- Throws:
XmlPullParserException
-
getNamespacePrefix
public java.lang.String getNamespacePrefix(int pos) throws XmlPullParserException
- Specified by:
getNamespacePrefix
in interfaceXmlPullParser
- Throws:
XmlPullParserException
-
getNamespaceUri
public java.lang.String getNamespaceUri(int pos) throws XmlPullParserException
- Specified by:
getNamespaceUri
in interfaceXmlPullParser
- Throws:
XmlPullParserException
-
getNamespace
public java.lang.String getNamespace(java.lang.String prefix)
- Specified by:
getNamespace
in interfaceXmlPullParser
-
getDepth
public int getDepth()
- Specified by:
getDepth
in interfaceXmlPullParser
-
getPositionDescription
public java.lang.String getPositionDescription()
- Specified by:
getPositionDescription
in interfaceXmlPullParser
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber
in interfaceXmlPullParser
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber
in interfaceXmlPullParser
-
isWhiteSpace
public boolean isWhiteSpace() throws XmlPullParserException
- Specified by:
isWhiteSpace
in interfaceXmlPullParser
- Throws:
XmlPullParserException
-
getText
public java.lang.String getText()
- Specified by:
getText
in interfaceXmlPullParser
-
getNamespace
public java.lang.String getNamespace()
- Specified by:
getNamespace
in interfaceXmlPullParser
-
getName
public java.lang.String getName()
Description copied from interface:XmlPullParser
Return the name for the current START_ELEMENT or END_ELEMENT event. This method must only be called if the current event is START_ELEMENT or END_ELEMENT.- Specified by:
getName
in interfaceXmlPullParser
- Returns:
- the name for the current START_ELEMETN or END_ELEMENT event.
-
getQName
public javax.xml.namespace.QName getQName()
- Specified by:
getQName
in interfaceXmlPullParser
-
getPrefix
public java.lang.String getPrefix()
- Specified by:
getPrefix
in interfaceXmlPullParser
-
getAttributeCount
public int getAttributeCount()
- Specified by:
getAttributeCount
in interfaceXmlPullParser
-
getAttributeNamespace
public java.lang.String getAttributeNamespace(int index)
- Specified by:
getAttributeNamespace
in interfaceXmlPullParser
-
getAttributeName
public java.lang.String getAttributeName(int index)
Description copied from interface:XmlPullParser
Returns the loacalpart of the attribute's name ornull
in case the index does not refer to an attribute.- Specified by:
getAttributeName
in interfaceXmlPullParser
- Parameters:
index
- the attribute index.- Returns:
- the localpart of the attribute's name or
null
.
-
getAttributeQName
public javax.xml.namespace.QName getAttributeQName(int index)
- Specified by:
getAttributeQName
in interfaceXmlPullParser
-
getAttributePrefix
public java.lang.String getAttributePrefix(int index)
- Specified by:
getAttributePrefix
in interfaceXmlPullParser
-
getAttributeType
public java.lang.String getAttributeType(int index)
- Specified by:
getAttributeType
in interfaceXmlPullParser
-
getAttributeValue
public java.lang.String getAttributeValue(int index)
- Specified by:
getAttributeValue
in interfaceXmlPullParser
-
getAttributeValue
public java.lang.String getAttributeValue(java.lang.String namespace, java.lang.String name)
- Specified by:
getAttributeValue
in interfaceXmlPullParser
-
getEventType
public XmlPullParser.Event getEventType() throws XmlPullParserException
- Specified by:
getEventType
in interfaceXmlPullParser
- Throws:
XmlPullParserException
-
next
public XmlPullParser.Event next() throws java.io.IOException, XmlPullParserException
- Specified by:
next
in interfaceXmlPullParser
- Throws:
java.io.IOException
XmlPullParserException
-
nextText
public java.lang.String nextText() throws java.io.IOException, XmlPullParserException
Description copied from interface:XmlPullParser
Reads the content of a text-only element, an exception is thrown if this is not a text-only element.- Precondition: the current event is START_ELEMENT.
- Postcondition: the current event is the corresponding END_ELEMENT.
- Specified by:
nextText
in interfaceXmlPullParser
- Returns:
- the textual content of the current element.
- Throws:
java.io.IOException
- in case of an IO error.XmlPullParserException
- in case of an XML pull parser error.
-
nextTag
public XmlPullParser.TagEvent nextTag() throws java.io.IOException, XmlPullParserException
- Specified by:
nextTag
in interfaceXmlPullParser
- Throws:
java.io.IOException
XmlPullParserException
-
supportsRoundtrip
public boolean supportsRoundtrip()
- Specified by:
supportsRoundtrip
in interfaceXmlPullParser
-
-