public class ParserUtils extends Object
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 |
forwardToEndTagOfDepth(org.xmlpull.v1.XmlPullParser parser,
int depth) |
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 Integer |
getIntegerAttribute(org.xmlpull.v1.XmlPullParser parser,
String name) |
static int |
getIntegerAttribute(org.xmlpull.v1.XmlPullParser parser,
String name,
int defaultValue) |
static int |
getIntegerFromNextText(org.xmlpull.v1.XmlPullParser parser) |
static Long |
getLongAttribute(org.xmlpull.v1.XmlPullParser parser,
String name) |
static long |
getLongAttribute(org.xmlpull.v1.XmlPullParser parser,
String name,
long defaultValue) |
public ParserUtils()
public static void assertAtStartTag(org.xmlpull.v1.XmlPullParser parser) 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 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 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)