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 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
-
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 Object getProperty(String name)
- Specified by:
getProperty
in interfaceXmlPullParser
-
getInputEncoding
public String getInputEncoding()
- Specified by:
getInputEncoding
in interfaceXmlPullParser
-
getNamespaceCount
public int getNamespaceCount() throws XmlPullParserException
- Specified by:
getNamespaceCount
in interfaceXmlPullParser
- Throws:
XmlPullParserException
-
getNamespacePrefix
public String getNamespacePrefix(int pos) throws XmlPullParserException
- Specified by:
getNamespacePrefix
in interfaceXmlPullParser
- Throws:
XmlPullParserException
-
getNamespaceUri
public String getNamespaceUri(int pos) throws XmlPullParserException
- Specified by:
getNamespaceUri
in interfaceXmlPullParser
- Throws:
XmlPullParserException
-
getNamespace
public String getNamespace(String prefix)
- Specified by:
getNamespace
in interfaceXmlPullParser
-
getDepth
public int getDepth()
- Specified by:
getDepth
in interfaceXmlPullParser
-
getPositionDescription
public 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 String getText()
- Specified by:
getText
in interfaceXmlPullParser
-
getNamespace
public String getNamespace()
- Specified by:
getNamespace
in interfaceXmlPullParser
-
getName
public 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 QName getQName()
- Specified by:
getQName
in interfaceXmlPullParser
-
getPrefix
public String getPrefix()
- Specified by:
getPrefix
in interfaceXmlPullParser
-
getAttributeCount
public int getAttributeCount()
- Specified by:
getAttributeCount
in interfaceXmlPullParser
-
getAttributeNamespace
public String getAttributeNamespace(int index)
- Specified by:
getAttributeNamespace
in interfaceXmlPullParser
-
getAttributeName
public 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 QName getAttributeQName(int index)
- Specified by:
getAttributeQName
in interfaceXmlPullParser
-
getAttributePrefix
public String getAttributePrefix(int index)
- Specified by:
getAttributePrefix
in interfaceXmlPullParser
-
getAttributeType
public String getAttributeType(int index)
- Specified by:
getAttributeType
in interfaceXmlPullParser
-
getAttributeValue
public String getAttributeValue(int index)
- Specified by:
getAttributeValue
in interfaceXmlPullParser
-
getAttributeValue
public String getAttributeValue(String namespace, 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 IOException, XmlPullParserException
- Specified by:
next
in interfaceXmlPullParser
- Throws:
IOException
XmlPullParserException
-
nextText
public String nextText() throws 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:
IOException
- in case of an IO error.XmlPullParserException
- in case of an XML pull parser error.
-
nextTag
public XmlPullParser.TagEvent nextTag() throws IOException, XmlPullParserException
- Specified by:
nextTag
in interfaceXmlPullParser
- Throws:
IOException
XmlPullParserException
-
supportsRoundtrip
public boolean supportsRoundtrip()
- Specified by:
supportsRoundtrip
in interfaceXmlPullParser
-
-