public class ParserUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
JID
The constant String "jid".
|
Constructor and Description |
---|
ParserUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
assertAtEndTag(org.xmlpull.v1.XmlPullParser parser) |
static void |
assertAtStartTag(org.xmlpull.v1.XmlPullParser parser) |
static void |
assertAtStartTag(org.xmlpull.v1.XmlPullParser parser,
String name) |
static void |
forwardToEndTagOfDepth(org.xmlpull.v1.XmlPullParser parser,
int depth) |
static org.jxmpp.jid.EntityBareJid |
getBareJidAttribute(org.xmlpull.v1.XmlPullParser parser) |
static org.jxmpp.jid.EntityBareJid |
getBareJidAttribute(org.xmlpull.v1.XmlPullParser parser,
String name) |
static Boolean |
getBooleanAttribute(org.xmlpull.v1.XmlPullParser parser,
String name)
Get the boolean value of an argument.
|
static boolean |
getBooleanAttribute(org.xmlpull.v1.XmlPullParser parser,
String name,
boolean defaultValue) |
static Date |
getDateFromNextText(org.xmlpull.v1.XmlPullParser parser) |
static Double |
getDoubleAttribute(org.xmlpull.v1.XmlPullParser parser,
String name) |
static double |
getDoubleAttribute(org.xmlpull.v1.XmlPullParser parser,
String name,
long defaultValue) |
static double |
getDoubleFromNextText(org.xmlpull.v1.XmlPullParser parser) |
static org.jxmpp.jid.EntityJid |
getEntityJidAttribute(org.xmlpull.v1.XmlPullParser parser,
String name) |
static org.jxmpp.jid.EntityFullJid |
getFullJidAttribute(org.xmlpull.v1.XmlPullParser parser) |
static org.jxmpp.jid.EntityFullJid |
getFullJidAttribute(org.xmlpull.v1.XmlPullParser parser,
String name) |
static Integer |
getIntegerAttribute(org.xmlpull.v1.XmlPullParser parser,
String name) |
static int |
getIntegerAttribute(org.xmlpull.v1.XmlPullParser parser,
String name,
int defaultValue) |
static int |
getIntegerAttributeOrThrow(org.xmlpull.v1.XmlPullParser parser,
String name,
String throwMessage) |
static int |
getIntegerFromNextText(org.xmlpull.v1.XmlPullParser parser) |
static org.jxmpp.jid.Jid |
getJidAttribute(org.xmlpull.v1.XmlPullParser parser) |
static org.jxmpp.jid.Jid |
getJidAttribute(org.xmlpull.v1.XmlPullParser parser,
String name) |
static Long |
getLongAttribute(org.xmlpull.v1.XmlPullParser parser,
String name) |
static long |
getLongAttribute(org.xmlpull.v1.XmlPullParser parser,
String name,
long defaultValue) |
static QName |
getQName(org.xmlpull.v1.XmlPullParser parser) |
static String |
getRequiredAttribute(org.xmlpull.v1.XmlPullParser parser,
String name) |
static String |
getRequiredNextText(org.xmlpull.v1.XmlPullParser parser) |
static org.jxmpp.jid.parts.Resourcepart |
getResourcepartAttribute(org.xmlpull.v1.XmlPullParser parser,
String name) |
static URI |
getUriFromNextText(org.xmlpull.v1.XmlPullParser parser) |
static String |
getXmlLang(org.xmlpull.v1.XmlPullParser parser) |
static boolean |
parseXmlBoolean(String booleanString)
Prase a string to a boolean value as per "xs:boolean".
|
public static final String JID
public ParserUtils()
public static void assertAtStartTag(org.xmlpull.v1.XmlPullParser parser) throws org.xmlpull.v1.XmlPullParserException
org.xmlpull.v1.XmlPullParserException
public static void assertAtStartTag(org.xmlpull.v1.XmlPullParser parser, String name) throws org.xmlpull.v1.XmlPullParserException
org.xmlpull.v1.XmlPullParserException
public static void assertAtEndTag(org.xmlpull.v1.XmlPullParser parser) throws org.xmlpull.v1.XmlPullParserException
org.xmlpull.v1.XmlPullParserException
public static void forwardToEndTagOfDepth(org.xmlpull.v1.XmlPullParser parser, int depth) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserException
IOException
public static org.jxmpp.jid.Jid getJidAttribute(org.xmlpull.v1.XmlPullParser parser) throws org.jxmpp.stringprep.XmppStringprepException
org.jxmpp.stringprep.XmppStringprepException
public static org.jxmpp.jid.Jid getJidAttribute(org.xmlpull.v1.XmlPullParser parser, String name) throws org.jxmpp.stringprep.XmppStringprepException
org.jxmpp.stringprep.XmppStringprepException
public static org.jxmpp.jid.EntityBareJid getBareJidAttribute(org.xmlpull.v1.XmlPullParser parser) throws org.jxmpp.stringprep.XmppStringprepException
org.jxmpp.stringprep.XmppStringprepException
public static org.jxmpp.jid.EntityBareJid getBareJidAttribute(org.xmlpull.v1.XmlPullParser parser, String name) throws org.jxmpp.stringprep.XmppStringprepException
org.jxmpp.stringprep.XmppStringprepException
public static org.jxmpp.jid.EntityFullJid getFullJidAttribute(org.xmlpull.v1.XmlPullParser parser) throws org.jxmpp.stringprep.XmppStringprepException
org.jxmpp.stringprep.XmppStringprepException
public static org.jxmpp.jid.EntityFullJid getFullJidAttribute(org.xmlpull.v1.XmlPullParser parser, String name) throws org.jxmpp.stringprep.XmppStringprepException
org.jxmpp.stringprep.XmppStringprepException
public static org.jxmpp.jid.EntityJid getEntityJidAttribute(org.xmlpull.v1.XmlPullParser parser, String name) throws org.jxmpp.stringprep.XmppStringprepException
org.jxmpp.stringprep.XmppStringprepException
public static org.jxmpp.jid.parts.Resourcepart getResourcepartAttribute(org.xmlpull.v1.XmlPullParser parser, String name) throws org.jxmpp.stringprep.XmppStringprepException
org.jxmpp.stringprep.XmppStringprepException
public static boolean parseXmlBoolean(String booleanString)
booleanString
- the input string.IllegalArgumentException
- if the input string is not valid.public static Boolean getBooleanAttribute(org.xmlpull.v1.XmlPullParser parser, String name)
parser
- name
- public static boolean getBooleanAttribute(org.xmlpull.v1.XmlPullParser parser, String name, boolean defaultValue)
public static int getIntegerAttributeOrThrow(org.xmlpull.v1.XmlPullParser parser, String name, String throwMessage) throws SmackException
SmackException
public static Integer getIntegerAttribute(org.xmlpull.v1.XmlPullParser parser, String name)
public static int getIntegerAttribute(org.xmlpull.v1.XmlPullParser parser, String name, int defaultValue)
public static int getIntegerFromNextText(org.xmlpull.v1.XmlPullParser parser) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserException
IOException
public static Long getLongAttribute(org.xmlpull.v1.XmlPullParser parser, String name)
public static long getLongAttribute(org.xmlpull.v1.XmlPullParser parser, String name, long defaultValue)
public static double getDoubleFromNextText(org.xmlpull.v1.XmlPullParser parser) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserException
IOException
public static Double getDoubleAttribute(org.xmlpull.v1.XmlPullParser parser, String name)
public static double getDoubleAttribute(org.xmlpull.v1.XmlPullParser parser, String name, long defaultValue)
public static Date getDateFromNextText(org.xmlpull.v1.XmlPullParser parser) throws org.xmlpull.v1.XmlPullParserException, IOException, ParseException
org.xmlpull.v1.XmlPullParserException
IOException
ParseException
public static URI getUriFromNextText(org.xmlpull.v1.XmlPullParser parser) throws org.xmlpull.v1.XmlPullParserException, IOException, URISyntaxException
org.xmlpull.v1.XmlPullParserException
IOException
URISyntaxException
public static String getRequiredAttribute(org.xmlpull.v1.XmlPullParser parser, String name) throws IOException
IOException
public static String getRequiredNextText(org.xmlpull.v1.XmlPullParser parser) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserException
IOException
public static String getXmlLang(org.xmlpull.v1.XmlPullParser parser)