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:
getPropertyin interfaceXmlPullParser
-
getInputEncoding
public String getInputEncoding()
- Specified by:
getInputEncodingin interfaceXmlPullParser
-
getNamespaceCount
public int getNamespaceCount() throws XmlPullParserException
- Specified by:
getNamespaceCountin interfaceXmlPullParser- Throws:
XmlPullParserException
-
getNamespacePrefix
public String getNamespacePrefix(int pos) throws XmlPullParserException
- Specified by:
getNamespacePrefixin interfaceXmlPullParser- Throws:
XmlPullParserException
-
getNamespaceUri
public String getNamespaceUri(int pos) throws XmlPullParserException
- Specified by:
getNamespaceUriin interfaceXmlPullParser- Throws:
XmlPullParserException
-
getNamespace
public String getNamespace(String prefix)
- Specified by:
getNamespacein interfaceXmlPullParser
-
getDepth
public int getDepth()
- Specified by:
getDepthin interfaceXmlPullParser
-
getPositionDescription
public String getPositionDescription()
- Specified by:
getPositionDescriptionin interfaceXmlPullParser
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumberin interfaceXmlPullParser
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumberin interfaceXmlPullParser
-
isWhiteSpace
public boolean isWhiteSpace() throws XmlPullParserException
- Specified by:
isWhiteSpacein interfaceXmlPullParser- Throws:
XmlPullParserException
-
getText
public String getText()
- Specified by:
getTextin interfaceXmlPullParser
-
getNamespace
public String getNamespace()
- Specified by:
getNamespacein interfaceXmlPullParser
-
getName
public String getName()
Description copied from interface:XmlPullParserReturn 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:
getNamein interfaceXmlPullParser- Returns:
- the name for the current START_ELEMETN or END_ELEMENT event.
-
getQName
public QName getQName()
- Specified by:
getQNamein interfaceXmlPullParser
-
getPrefix
public String getPrefix()
- Specified by:
getPrefixin interfaceXmlPullParser
-
getAttributeCount
public int getAttributeCount()
- Specified by:
getAttributeCountin interfaceXmlPullParser
-
getAttributeNamespace
public String getAttributeNamespace(int index)
- Specified by:
getAttributeNamespacein interfaceXmlPullParser
-
getAttributeName
public String getAttributeName(int index)
Description copied from interface:XmlPullParserReturns the loacalpart of the attribute's name ornullin case the index does not refer to an attribute.- Specified by:
getAttributeNamein interfaceXmlPullParser- Parameters:
index- the attribute index.- Returns:
- the localpart of the attribute's name or
null.
-
getAttributeQName
public QName getAttributeQName(int index)
- Specified by:
getAttributeQNamein interfaceXmlPullParser
-
getAttributePrefix
public String getAttributePrefix(int index)
- Specified by:
getAttributePrefixin interfaceXmlPullParser
-
getAttributeType
public String getAttributeType(int index)
- Specified by:
getAttributeTypein interfaceXmlPullParser
-
getAttributeValue
public String getAttributeValue(int index)
- Specified by:
getAttributeValuein interfaceXmlPullParser
-
getAttributeValue
public String getAttributeValue(String namespace, String name)
- Specified by:
getAttributeValuein interfaceXmlPullParser
-
getEventType
public XmlPullParser.Event getEventType() throws XmlPullParserException
- Specified by:
getEventTypein interfaceXmlPullParser- Throws:
XmlPullParserException
-
next
public XmlPullParser.Event next() throws IOException, XmlPullParserException
- Specified by:
nextin interfaceXmlPullParser- Throws:
IOExceptionXmlPullParserException
-
nextText
public String nextText() throws IOException, XmlPullParserException
Description copied from interface:XmlPullParserReads 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:
nextTextin 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:
nextTagin interfaceXmlPullParser- Throws:
IOExceptionXmlPullParserException
-
supportsRoundtrip
public boolean supportsRoundtrip()
- Specified by:
supportsRoundtripin interfaceXmlPullParser
-
-